Thread HTML::Entities - decode_entities() erzeugt kein Unicode sondern Latin1
(40 answers)
Opened by GwenDragon at 2024-03-19 12:49
Ich versuche es mal mit was neuerem: HTML::HTML5::Entities
//EDIT: Der Schnippsel hilft nicht. Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 my $contains_term = 0; eval { use HTML::HTML5::Entities; use Encode qw/decode encode/; $terms = decode('UTF-8',$terms); # in Perls interne Zeichenkette $contents = decode('UTF-8',$contents); # in Perls interne Zeichenkette $contents = HTML::HTML5::Entities::decode($contents); # HTML Entities dekodieren $contains_term = ($contents =~ /$terms/); # Matcht es? }; Last edited: 2024-03-20 19:00:23 +0100 (CET) |