SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Trying to decide if I should convert to utf-8

    When I designed my website 8 years ago I never thought that foreign people would register. Most of my users are from the US, Canada and Australia, however, there is a good number from other countries too. Some of their names, obviously, are not stored correctly in the DB because of the different characters that are used. I've done some research and switching to utf-8 is no small job. I'm wondering if it's worth the time and expense to implement. Anyone care to comment on their migration experience?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Can't tell you anything about migration to utf-8, but another (maybe simpler) solution you might consider (if the migration turns out to be too much work) is restricting the character set allowed for their name when registering. Obviously it's not the perfect solution, but if your database doesn't store characters like correctly, what's the point in allowing them to be used at all?

  3. #3
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    My DB uses Latin1 for the character set. I just tried pasting the special characters you used in your post and it worked. That's odd. I thought the DB had to be configured to use utf-8 to support foreign characters. What am I missing here?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,273
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by busboy View Post
    I thought the DB had to be configured to use utf-8 to support foreign characters. What am I missing here?
    the obvious answer is, those characters aren't "foreign"

    see http://en.wikipedia.org/wiki/ISO/IEC_8859-1

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •