Eric,
I think that you don't have to write a conversion program because MySQL have built-in pretty good character set conversions. All you need to do is to tell MySQL which character set uses your file with your SQL commands. Create your file with one of the character sets MySQL understands and put as a first command to execute SET NAMES 'character_set_of_your_file' You can check MySQL's character sets by executing command SHOW CHARACTER SET.

HTH,
Dusan

Eric Lilja napsal(a):
Thanks for the reply, Mr Schwartz. I will see if I can find some clue on how to write such a program myself.

- Eric

Jerry Schwartz skrev:
I have run into this as well. Windows uses CP-1522 (if I remember
correctly), which is not exactly equivalent to UTF-8. I presume it is also not exactly equivalent to the character set you're using for MySQL. I wound
up writing a program to convert the one character set to the other.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric Lilja
Sent: Wednesday, December 13, 2006 2:03 PM
To: mysql@lists.mysql.com
Subject: MySQL 5.0.27: character problem

Hello, I'm using MySQL version 5.0.27 under Windows XP
professional. I
have a text file with some SQL commands (I create a few tables and
insert some rows into them). I noticed that all columns where
I tried to
insert a swedish character, that character got corrupted. But
it works
if I type the same explicitly in mysql monitor. What do I
need to do so
I can use command files and still have proper handling of swedish
characters?

- Eric


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]









--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to