Solved

mySQL query browser will not display chinese characters properly when inserted from asp script

Posted on 2006-06-09
2
1,313 Views
Last Modified: 2012-06-21
Hi,

I am having a problem with displaying chinese characters in mysql query browser. I have set all possible variables to utf8 and have made the tables utf8 as well. I am currently trying to insert data from an asp script where I have set the encoding in the meta tag to utf-8 as well. I have also put charset = utf8 in the connection string as well. When I insert a record that contains chinese characters (utf8) I get some garbage characters that look like big5 in an english encoding. However when I retrieve the record from the database I will get a record that displays chinese correctly in the script. It just doesn't display correctly in mysql query browser. I can paste chinese (utf8) properly into tables using mysql query browser but in this case when a record is retrieved I get ??? in the web browser when running the script even if I change the encoding to big5 or any other chinese encoding. I have spent a lot of time on this and have yet to find a solution.

Show Variables;

character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8

Thanks,
Bluefusion

0
Comment
Question by:Bluefusion
2 Comments
 
LVL 29

Accepted Solution

by:
fibo earned 500 total points
ID: 16879908
I have good news and bad news.
First the good: all your stuff works fine, except #@$€!§ display in mysql query browser.
Bad news: maybe it will never dislay properly in the query browser

Good news: so what? who cares? you are currently caring, because you suspect this might clue at something wrong... but what is important is that your script do display correctly the data in your database, which is the important part! Part of your debug process does not work, but your goal is to have the process right, not to debug the debug!

Some hints:
- not sure which program you mean by "mysql query browser", there could be lots of them. (if you have not already, consider also using phpmyadmin)
Assuming however that, like phpmyadmin, they display their results into a browser:
- display your query results as usual (you get the same garbage as usual)
- now change the character code used to display the page. In internet explorer, this should be something like "display" / "codepage" there you'll need to experiment with various options (add/ remove "automatic"; "UTF-8", "simplified Chinese", etc.) [for firefox: "display" / "character codes" ...]. You may find that one of these correctly displays the results.
- If you are not using phpmyadmin, I suggest strongly that you do. The most recent version handles reasonably well this character code problem; previous don't... but the trick I described above works in most cases [note howver that since phpmyadmin uses frames, it is the codes of the rightmost frame that you need to change: do a right-click from above this frame, and change charcetr codes from here]. If your server does not have phpmyadmin already install, you can install it in a directory of your choice, it is a php script you just have to copy at the right place.
The homepage for phpmyadmin is at http://www.phpmyadmin.net/home_page/index.php and you can download files from http://www.phpmyadmin.net/home_page/downloads.php
0
 

Author Comment

by:Bluefusion
ID: 16881970
Thanks for the response.

I guess I'll give phpmyadmin a try.

By mysql query browser I mean the GUI that can be downloaded from the mysql website that handles the editing of tables and their contents.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Closing database connection after prepared statement 1 53
update joined tables 2 47
updating the date data 12 30
insert row field data graphically 4 24
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question