Solved

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

Posted on 2006-06-09
2
1,309 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now