in reply to character encoding & french accents
First of all, where does your source document come from? Which factors determine its encoding?
Ultimately the best course of action is to ensure that you're using utf8 everywhere (and advertising that to the viewing programs). You can tell the web browser that your content is in utf8 by sending an additional "charset" header attribute like this:
You can do the same for emails, by giving them the appropriate MIME headers:use CGI; my $cgi = CGI->new; ... print $cgi->header(-type=>'text/html', -charset=>'utf-8');
How you do that depends on how your email-sending code is designed.Content-Type: text/plain; charset="utf-8"
I'd like to point out that in recent perls (version 5.8), under most circumstances, strings are encoded internally as utf8. So it makes sense to be consistent about that in the rest of your application.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: character encoding & french accents
by dstamos (Initiate) on Feb 03, 2006 at 15:08 UTC | |
by rhesa (Vicar) on Feb 03, 2006 at 16:33 UTC |