Unix Technical Forum

Any real reason need to use UTF8 as table character set?

This is a discussion on Any real reason need to use UTF8 as table character set? within the MySQL forums, part of the Database Server Software category; --> Currently I am justing using Latin1 as Table character set to store UTF8 data, it work very well. I ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-14-2008, 11:46 AM
setesting001@gmail.com
 
Posts: n/a
Default Any real reason need to use UTF8 as table character set?

Currently I am justing using Latin1 as Table character set to store
UTF8 data, it work very well.

I don't need those collation stuffs for my data, are there any real
reason I need to use UTF8 as table character set then?

I don't see any benefit but I see some drawback, e.g.

1. Need to set names "UTF8" in each db connection.
2. MySQL UTF8 is just plane 1 support

Any suggestions?

Roy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-17-2008, 03:02 AM
John Nagle
 
Posts: n/a
Default Re: Any real reason need to use UTF8 as table character set?

setesting001@gmail.com wrote:
> Currently I am justing using Latin1 as Table character set to store
> UTF8 data, it work very well.


If you think that's working, you're not testing enough.
>
> I don't need those collation stuffs for my data, are there any real
> reason I need to use UTF8 as table character set then?


If you use ">" or "<" or ORDER BY on those fields, and the
fields actually have UNICODE data in them, the results will be weird.
None of the string operators, like CONCAT, will work right.

If you're going to treat UTF8 data like that, you might just
store it as a BLOB, viewed as opaque by the database. That
locks out all the operations which will do the wrong thing on
misinterpreted data.

John Nagle
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-17-2008, 03:02 AM
Roy M
 
Posts: n/a
Default Re: Any real reason need to use UTF8 as table character set?

Hi

On 6$B7n(B15$BF|(B, $B>e8a(B1$B;~(B45$BJ,(B, John Nagle <na...@animats.com> wrote:
> setesting...@gmail.com wrote:
> If you use ">" or "<" or ORDER BY on those fields, and the
> fields actually have UNICODE data in them, the results will be weird.
> None of the string operators, like CONCAT, will work right.
>


I agree <, > , and order will made stuff not working, so it depends if
you need to operate those operartions on text data.

Some string operations might also have strange behaviour, but I have
tested CONCAT should-be-okay

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:47 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com