This topic is locked

Setting up proper charset for EDIT and ADD templates

5/15/2007 3:19:32 PM
PHPRunner General questions
J
jacekq author

Hi,

I had a problem with Innova editor on my EDIT and ADD pages. The problem was with coping WORD documents into textarea fields. I tried to implement a table with text columns for different languages. So, on EDIT and ADD pages, there were 4 textarea fields for different languages each.

All worked 'fine' - I was able to copy polish text from WORD into one field and french text from WORD into another. I could see all national characters for all languages. After saving it into MySQL table I couldn't see proper characters again.

Solution was to set the following tag:

<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-2">



PHPR doesn't set this tag at all!

I think that if that tag is not set it's set default to iso-8859-1 charset. So all characters that are outside this set are converted inproperly.
I think that solution should be to set up that tag for all smarty templates to UTF-8. It's important for non-english pages.
Regards,

Jacek

Alexey admin 5/16/2007

Jacek,
yes, UTF-8 is the only solution when you have text in diifferent encodings in one project.

To change the encoding modify this line generated include\dbcommon.php file.
$cCharset = "utf-8";