SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Feb 11, 2005, 05:31 #1
- Join Date
- Aug 2002
- Location
- Barcelona
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Problem using MySQL LOAD with "special" characters
I am trying to load a MySQL table with text data that contains non-ASCII characters, such as an ñ [n-tilde] and è [e-grave].
When I use mysql LOAD to load the data from a text file, it completes without a warning or error, but those "special characters" turn into unrecognizable characters when viewed in a shell mysql session and when output in a PHP script to a browser.
I've tried importing the file using both a MySQL shell session, and phpMyAdmin, and have the same results. I *can* enter a "special character" directly into the field, again using either a shell or phpMyAdmin, so the database itself does support the character sets in question (or appears to!).
I'd appreciate any advice on how can I coerce MySQL to store those characters, without having to edit all my records manually once they've been imported!
Thanks in advance for any replies :-)
-
Feb 11, 2005, 11:22 #2
- Join Date
- Apr 2004
- Location
- germany
- Posts
- 4,324
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
mysql is very good documented btw
MySQL Localization and International Usage
-
Feb 11, 2005, 11:47 #3
- Join Date
- Aug 2002
- Location
- Barcelona
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, I've read all those documents which refer to configuring MySQL - As I said, the problem is not that MySQL isn't supporting the special characters, the problem is with the LOAD function.
Juddster
-
Feb 16, 2005, 11:42 #4
- Join Date
- Aug 2002
- Location
- Barcelona
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm completely unable to locate any help using Google, apart from someone who had the same problem in 2003 - shame his post had no way of contacting him, then I could ask him directly!
I'd really appreciate it if someone has any light to shed on this. Try loading a simple word like "áéö" but using the LOAD DATA INFILE not the INSERT etc. syntax. Works fine with the latter, completely destroyed with the former. Bizarre.Juddster
Bookmarks