in reply to Re: UTF-8 to Latin1 - unmatched characters?
in thread UTF-8 to Latin1 - unmatched characters?
So, I found this which converts non-matched UTF-8 characters to something: http://linuxgazette.net/117/tag/4.html
So basically, the code would be something like:
# Converted UTF codes for non-matching ISO-8859-1 # Strip it down to basic ASCII %utf_entity = ( "\x{2019}", "'", "\x{201c}", '"', "\x{201d}", '"', "\x{2026}", "...", "\x{fffd}", "", ); s/(\X)/ exists $utf_entity{$1} ? $utf_entity{$1} : $1 /eg;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: UTF-8 to Latin1 - unmatched characters?
by ikegami (Patriarch) on Mar 27, 2008 at 17:41 UTC | |
by uncommon13 (Novice) on Mar 28, 2008 at 14:56 UTC |