Thread HTML::Entities - decode_entities() erzeugt kein Unicode sondern Latin1 (40 answers)
Opened by GwenDragon at 2024-03-19 12:49

GwenDragon
 2024-03-21 19:14
#195964 #195964
User since
2005-01-17
14563 Artikel
Admin1
[Homepage]
user image
Tut mir leid, im Code ist eine Zuweisung drin für term und content, habe ich bei der rohen Beschreibung etwas geschlampt beim Posten.
Ich benutze eigentlich immer Encode::decode('UTF-8', ...) wenn die Datei UTF-8 ist.
Da ist doch dann wohl das Pragma CGI qw/-utf8/ obsolet, oder.



Die Datei ist korrekt UTF-8.
file t.txt zeigt mir t.txt: Unicode text, UTF-8 text
Und hexdump:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
root@srv ~ # hd < t.txt
00000000 54 65 73 74 20 66 c3 bc 72 20 55 6d 6c 61 75 74 |Test f..r Umlaut|
00000010 65 3f 0a 6d 65 74 61 2d 63 72 65 61 74 69 6f 6e |e?.meta-creation|
00000020 5f 64 61 74 65 3a 20 32 30 32 34 2d 30 33 2d 32 |_date: 2024-03-2|
00000030 31 54 31 35 3a 35 34 3a 32 34 0a 0a 46 c3 bc c3 |1T15:54:24..F...|
00000040 9f 65 20 28 61 6c 73 20 55 54 46 2d 38 29 20 75 |.e (als UTF-8) u|
00000050 6e 64 20 26 61 75 6d 6c 3b 26 6f 75 6d 6c 3b 26 |nd &auml;&ouml;&|
00000060 75 75 6d 6c 3b 20 28 6b 6f 64 69 65 72 74 20 61 |uuml; (kodiert a|
00000070 6c 73 20 48 54 4d 4c 2d 45 6e 74 69 74 c3 a4 74 |ls HTML-Entit..t|
00000080 29


46 c3 bc c3 9f 65 = Füße
Last edited: 2024-03-21 19:24:28 +0100 (CET)
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread HTML::Entities - decode_entities() erzeugt kein Unicode sondern Latin1