SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    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 :-)

  2. #2
    SitePoint Wizard stereofrog's Avatar
    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

  3. #3
    SitePoint Enthusiast
    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

  4. #4
    SitePoint Enthusiast
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •