I've got an ASP page that retrieves and displays text from a MySQL5 DB. The text is in English and Japanese. Works fine on the production server. On the development server the Japanese displays as gibberish (E.g., €šã‚‚ç´?å¾—ã?®å“?ã?žã‚?ã?ˆã?¨ï¼“æ‹?å ?ã??ã‚?ã).
The page uses the same connection string on each server to connect to the same database:
When I added charset=UTF8; to the connection string I still got gibberish, but more of it.
The page has UTF-8 character set specified in the head:
And, if it makes any difference, the doctype is:
The database is populated by using PHP pages (forms) with a connection string that does not specify the character set. Could that be part of the problem? If so, then why does the page on the production server work okay? Also, the PHP pages display correctly. Querying the database with SHOW VARIABLES LIKE 'character_set_database'; indicates that the DB is using UTF-8.
What else could make the Japanese display incorrectly? Are there ASP server settings that could make a difference?
The page uses the same connection string on each server to connect to the same database:
Code:
connectstring = "Driver={MySQL ODBC 3.51 Driver}; Server=xx.xx.xx.xx; Port=3306; Database=mydatabase; USER=myuser; PASSWORD=mypassword;"
When I added charset=UTF8; to the connection string I still got gibberish, but more of it.
The page has UTF-8 character set specified in the head:
Code:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
What else could make the Japanese display incorrectly? Are there ASP server settings that could make a difference?