MySQL Unicode INSERTs

by Daniel Alexander Smith on July 30th, 2009

Note to anybody trying to get UTF-8 data into MySQL properly, it might help you to know that you can prepend strings with _utf8 so that they get INSERTed properly, e.g.:

INSERT INTO `People` VALUES (_utf8'Däniél Smîth');

There was a tiny hint in the code sample at the end of the following page that let me in on the secret:

http://dev.mysql.com/tech-resources/articles/4.1/unicode.html

Share and Enjoy:
  • email
  • Print
  • Twitter
  • del.icio.us
  • Facebook
  • Digg
  • Technorati
  • StumbleUpon
  • Slashdot
  • Ping.fm
  • LinkedIn
  • Google Bookmarks
  • MySpace
  • Netvibes
  • Reddit
  • Tumblr

From Uncategorized

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS