954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Mysql charset encoding utf8 latin1 unicode load data infile

Hi all,

My web application uploads files from MySQL database.

I have the text in ms word *.doc files, so I convert it to *.txt as UNICODE-UTF8, and mysql table charset is set to UTF8.

I load the database entering this command:

LOAD DATA local INFILE 'file.txt' INTO TABLE tab;


I'm getting some problems here with the charset enconding. For example this text:

Amente	E ainda os escravos algũas horas podem folgar sem culpa, chorar podem todas. Nam é a sojeição cousa que assi se possa sofrer e a mi


is loaded to the database like this:

----
 ´╗┐

I also converted the *.doc file to web page *.htm and I got this loaded into mysql database:

|
 <p class=MsoNormal><span class=131estrangeiros1559><span style='mso-tab-count:
             |
 1'>┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á </span>E ainda os escravos alg┼®as horas pod
                |
                                     |ojeição</span></p>

Please, can you give me any advice?

Thank you

softDeveloper
Junior Poster in Training
67 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: