HTML, Unicode, and Perl

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: Matt Alexander
Dátum:  
Tárgy: HTML, Unicode, and Perl
Matt Alexander said:
> Does anyone know how I would take an HTML unicode character and convert it
> to the actual unicode character in a text file using Perl? For example,
> let's say I have López. I'd like the ó to be converted to the
> character with the o and the accent over it and saved to a plain text
> file.
> Thanks,
> ~M


I figured it out. Browsers use decimal for unicode. So I would convert
243 in decimal to F3 in hex and then I can print the character:

perl -e 'print "\x{F3}\n"