Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: character encoding & french accents

by dstamos (Initiate)
on Feb 03, 2006 at 15:08 UTC ( [id://527674]=note: print w/replies, xml ) Need Help??


in reply to Re: character encoding & french accents
in thread character encoding & french accents

Thank you to rhesa, graff & fraktalisman for your constructive input. "First of all, where does your source document come from? Which factors determine its encoding?" The content comes from an input box (form) and the cgi program writes this to a text file. What happens after that i dont know. I was able to modify the script to insert a MIME header as you suggested but it did not change anything. I dont know what determines its encoding. I think im going to have to get the programmer involved here and come back with some code and more info. thank you again to everyone.
  • Comment on Re^2: character encoding & french accents

Replies are listed 'Best First'.
Re^3: character encoding & french accents
by rhesa (Vicar) on Feb 03, 2006 at 16:33 UTC
    I think getting your developer in here to discuss the details is a very good idea.

    I've found on several occasions that it's necessary to manually upgrade form input to utf8. For some reason, CGI returns raw byte strings, and those might end up being upgraded to utf once more, resulting in lots of squiggly characters. I did this like so:

    use Encode; my $email_body = $cgi->param( 'email_body' ); $email_body = decode_utf8( $email_body );
    After this, most conversions and display issues are a snap.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://527674]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-24 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found