Menu

#54 Unicode

open
None
1
2010-10-03
2009-01-09
No

I think there is a small problem on handling unicode strings:

My log contains:
"\x{00e4}" does not map to ascii at /usr/bin/GetLive/GetLive.pl line 176.
Handling mail
from : 'ADAC-Newsletter'
subject : 'Wir pr\x{00e4}sentieren Ihnen das Lieblingsauto der Deutschen'

So an "ä" produced an error message!

Is it possible to add unicode handling to the scipt?
I found plenty of different solutions under:
http://ahinea.com/en/tech/perl-unicode-struggle.html

Thanks a lot for the great script!

Axel

Discussion

  • King of the ring

    I changed the first line of the script to

    #!/usr/bin/perl -w -CS

    Seems to work!

     
  • Jos De Laender

    Jos De Laender - 2010-10-03
    • priority: 5 --> 1
    • assigned_to: nobody --> jdla
     
  • Jos De Laender

    Jos De Laender - 2010-10-03

    I'm cleaning up and I'm wondering if this is still an issue.
    I vaguely remember I included some 'locale encoding' in the script.
    Of course, this assumes your locale settings are correct ...
    Can you ping ?