Forum Moderators: coopster & phranque

Message Too Old, No Replies

Getting Greek into MySQL database

Trouble inserting greek characters in MySQL

         

kuku drifter

7:49 pm on Dec 5, 2002 (gmt 0)

10+ Year Member



I am building a rather large online tool for my company. One portion of it is an Online Glossary. One of the languages that I am using is Greek. When I try to insert greek into the database (using phpmyadmin) I get corrupted characters. I have tried using a .csv files and text files. I have tried unicode, utf-8, utf-7, greek encoded, and just standard windows encoding using unicode fonts, greek fonts, and any variation there of. All of these files I can view on my machine in some combination of notepad, word, excel, and a few other basic text editors.

I work at a translations company as the localization technologies Manager as well as the Overall IT manager. I have nearly every font avaible (save the $$$ ones) and have my windows machine set up to handle every page code, file format, and font with the addition of several overlay tools. I have checked mysql, php, and the linux machine itself. All of them are configured to support greek.

So... does anyone have the magic bullet?

Thanks

Woz

10:01 pm on Dec 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi kuku_drifter, Welcome to WebmasterWorld [webmasterworld.com].

I know nothing about this myself, but do remember a thread recently on the very same subject that may have some answers for you. Try here [webmasterworld.com].

Onya
Woz

kuku drifter

10:37 pm on Dec 5, 2002 (gmt 0)

10+ Year Member



Well I did a bunch of reading today (including the above link thanks :) ) Here is what I learned. You can insert any language you want into a MySQL database table. As I mentioned I was having no problem with the Japanese previously. The key is that when you insert it must be encoded in the native language. So in this case I saved as encoded text and chose to save it as a Greek Encoded file.

Now here comes the tricky part. It is going to look like garbage to you when you view it through either PHPMyAdmin or on a web page you are sending queried information to.

WHY?!?!?!

Well let me tell you. Your browser is set to Windows (US) encoding. So go into your view menu for the browser and choose page encoding and change it to the language you are trying to see. Like a miriacle... it shows up. Now the reason we would all like to use Unicode which is not yet supported... is because then we could have all language displaying at the same time. As it is now my Greek won't show at the same time as my Japanese nor will the Arabic show with my Chinese. However... typically when viewing one of the 5 difficult languages... the English will always show... so this option works...

Hope that helps someone else... I am not the smartest guy here, am self taught, have never taken a computer class (well intro to computer is101 doesn't count), and learn on a need be basis, but I am resourceful and will not give up. I have learned the most important lesson... there is nothing that can't be done...