I posted this on the php-i18n list already, but I thought it might be
relevant here too, so here goes.
I am currently using PHP 4.3.1 with Microsoft Access 2000 in Windows 2000
with IIS web server to store content for a multilingual website.
I am having two different but related problems.
When Greek characters are pulled from the database and displayed on the web,
they appear completely garbled. The same goes for accented characters in
other languages such as French, Spanish, etc.
It seems that any characters outside the standard ASCII range are not
To see an example of what should be displayed and how it is actually being
displayed, go to http://www.electonline.org/examples/example1.php
Source of that PHP page is at
Can someone tell me how to display the characters correctly?
Greek characters entered into a form (with charset attribute set to 'utf-8')
does not get added properly to the database.
This screenshot demonstrates how the above Greek string appears after being
added to the database via a form:
However, when this garbled string is pulled back out from the database and
displayed on the webpage, it appears perfectly!
I would like to know how to store the string correctly in the database.
My theories as to why these connected problems are occuring are:
- Access 2000 is UTF-16 and the strings being added to the database are
UTF-8. I have tried using iconv and mb_convert_encoding but to no avail.
- PHP can't handle the strings coming from the database because they are in
- The 'charset' attribute is set to 'UTF-8'. The characters appear perfect
when viewed in Access 2000.
- The connection to the database is being made by a system DSN.
- mbstring support is enabled.
- In php.ini, I have set mbstring.internal_encoding to UTF-8 and set
mbstring.encoding_translation to On.
Any suggestions you might have would be greatly appreciated.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php