[thelist] MySQL Munging Non-ASCII Characters

MarsHall evolt at marsorange.com
Thu Feb 13 11:27:01 CST 2003


Good morning evolters!

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 mysqlimport 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 tried using htmlentities(), of
course].

How can I coerce MySQL to store those characters? Escape sequences?
Character set preferences?

I am currently storing the text encoded with HTML-entities, but would
prefer to keep my data as raw/unencoded as possible.

I am running:
	- Mac OS X 10.2.3
	- PHP 4.2.3 (from entropy.ch)
	- MySQL 3.23.39 (from entropy.ch)
		using the default character set
	- tab-delimited data file created in BBEdit 7

Thanks for any suggestions!
Mars :)




More information about the thelist mailing list