HTML, Unicode, and Perl

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Matt Alexander
日付:  
題目: 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"