ASP and UTF8
Posted by: Sean
Date: October 28, 2005 06:32AM

I have a MySQL 4.1.11 database MyODBC 3.51. The tables and all columns are configured as utf8.
The ASP pages are all encoded correctly as utf8. I use SET NAMES utf8 in the connection string as the DB is hosted.

Now the ASP pages *seemed* to work fine. I added some test characters (for example special Turkish characters) from the ASP page, requery the database for the added record and re-display it on the ASP page as a test. The special characters appear to be stored correctly in the DB and re-displayed on the ASP page as they were entered.

Great! Well not quite....

I then looked at the added data in QueryBuilder or Navicat and all the special characters are displayed as gibberish (QB and Navicat are definately both configured to display utf8 correctly).

So I use Querybuilder to add some similar Turkish characters to the database - all seems fine, the special characters are displayed as input in Querybuilder and Navicat. I then look at the same added item in the ASP page and it shows as '????' for the special characters, all English characters are fine.


I enter the string "ŞŞŞŞ" on ASP, I requery the DB and display it on another ASP page - it's fine "ŞŞŞŞ" is showing but I check same string in Query Browser and "ŞŞŞŞ" is displayed.

I enter the string "ŞŞŞŞ" in Query Browser as a test,it is stored correctly as "ŞŞŞŞ" - viewing this string on the above ASP displays "????".

I am really confused as to what is going on - special characters entered in ASP views fine when re-viewed on ASP but not in QB. Data entered in QB displays fine when re-viewed in QB but shows as "????" in ASP.

Any ideas as to where things are going wrong with the encoding?

TIA for any help.

Options: ReplyQuote

Written By
ASP and UTF8
October 28, 2005 06:32AM
March 08, 2006 08:13AM
March 17, 2006 09:55AM
April 05, 2006 10:02AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.