|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
UTF-8 to ISO-8859-1 conversion of euro symbolby Anonymous Monk |
| on Mar 03, 2005 at 08:54 UTC ( [id://436207]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to convert the euro symbol from utf-8 to ISO-8859-1. So far I am having no luck. I am using Perl 5.8.5.
I have a template, which is in utf-8 and filled with utf-8 data (from another source). I'm encoding the result in ISO-8859-1 using Unicode::MapUTF8::from_utf9() (version 1.09). This is what I have tried, with the following conversion code:
It's quite likely the symbols aren't displaying correctly; in Regex A I am using the symbol that was used in attempt 2 above (literally typed character in utf-8), and in Regex B I am using the symbol that was used in attempt 3 above (literally typed character in ISO-8859-1). I then tried:
Can anyone offer suggestions on how I could convert from a typed euro symbol in utf-8 (as opposed to €) to a typed symbol in ISO-8859-1?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||