[Melbourne-pm] UTF-8 headaches

Kat Grant crashkat at gmail.com
Wed Nov 14 17:16:17 PST 2007


Thanks Simon, Toby

I read that calling with -C was equivalent to setting $ENV 
{PERL_UNICODE}, and this didn't help.
Haven't looked at LOCALE.

I'll mess with this and dump out the environment hashes from both and  
see how we go.

Lunch first tho :)

Cheers
K


On 15/11/2007, at 12:06 PM, Toby Corkindale wrote:

> Kat Grant wrote:
>> Hi All
>>
>> We have a web front ended application, and (not unusually) some jobs
>> that run server side in the background.
>> My problem is that the same bit of code called from within the web
>> server handles utf8 characters in just fine, but when called from a
>> standalone script, turns them into rubbish.
>>
>> The code is literally identical, and it's doing my head in.
>>
>> I've tried running with all the various possible values of -C but
>> nothing has helped.
>>
>> The code is pulling some UTF-8 data from a mysql database,
>> constructing a MIME::Lite message and sending it. The messages come
>> through fine when sent from within the webserver, but the characters
>> are trashed when sent from a stand alone script.
>>
>> We use perl 5.8.8, MySQL 5, Apache 1.3, mod_perl on debian.
>>
>> Can anyone suggest anything?
>
> Check $ENV{LOCALE} and related environment flags under web server's  
> env
> and your shell env?
>
> Also - assert that the strings /are/ utf8 encoded, just in case  
> they're
> not and it just happens that the webserver is managing to
> detect-and-correct the bytestreams somehow?
>
> Toby
>
>>
>> Cheers
>> K
>>
>> _______________________________________________
>> Melbourne-pm mailing list
>> Melbourne-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/melbourne-pm
>
>
> -- 
> Toby Corkindale
> Software developer
> _______________________________________________
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
> http://mail.pm.org/mailman/listinfo/melbourne-pm



More information about the Melbourne-pm mailing list