[cgiapp] Problem displaying French, sometimes

Mike Tonks fluffymike at googlemail.com
Wed Sep 10 03:50:20 EDT 2008


Hi Ron,

Your script should send a response header as follows:

Content-Type: text/html; charset=UTF-8

and in your HTML source you should have a matching meta-tag:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


If you're using CA then the response header can be defined by:

$self->header_add(-charset => 'utf-8');

or if you're using sessions then you need something like

$self->session->header_add(-charset => 'utf-8');


The output from the test script looks good - nice to see the utf8
survived an email round trip!

I'll attach the test_utf8.txt file - it's just to test that utf8 data
can be read from a file correctly.

The next part will be more important for you - getting the data from
the database correctly.  As I mentioned you will need to edit the
script at that point to account for your database setup and table
names, etc.

mike
-------------- next part --------------
UTF8 Test data read from file
Czech and Slovak characters: š  ť  ž  ľ  č  ě ď ň ř ů ĺ Š Ť Ž Ľ Č Ě Ď Ň Ř Ů Ĺ
Polish characters: Å‚ Ä
 ż ę ć ń ś ź  Ł Ą Ż Ę Ć Ń Ś Ź
Romanian characters: Ă ă Ş ş Ţ ţ
Croatian and Slovenian characters: š č ž ć đ Š Č Ž Ć Đ
Hungarian characters: Ő ő Ű ű
German characters: Ä, ä, Ö, ö, Ü, ü, ß
Russian alphabet: абвгдеёжзийклмно прстуфÑ
цчшчьыъэюя АБВГДЕЁЖЗИЙ КЛМНОПРСТУФ ХЦЧШЩЬЫЪЭЮЯ
Special Byelorussian and Ukrainian characters: Ў ў Є є Ґ ґ
Special Serbian and Macedonian characters: Ђ Љ Њ Ћ Џ ђ љ њ ћ џ
Arabic: ب‎ج‎د‎ﻫ‎و‎ز‎ح‎ط‎ع‎ف‎ص‎ق‎ر‎ش‎ت‎ث‎خ‎ذ‎ض‎ظ‎غ‎


More information about the cgiapp mailing list