For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > November 2006 > Re: use of varchar MySQL versus nvarchar MS SQL









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: use of varchar MySQL versus nvarchar MS SQL
J.O. Aho

2006-11-23, 6:58 pm

Pugi! wrote:
> A nvarchar is a varchar (only ascii) for unicode text on MS SQL-server.
> How do you use varchar on mysql for unicode ?
> If you use a varchar(100) will the maximum number of characters be
> independent of the characterset (latin, japanese, chinese, ...) or will
> a japanese or chinese characterset will not be able to store 100
> characters ?


Don't have any good answer for this, more than take a look at the mysql
documentation, http://dev.mysql.com/doc/refman/5.0...et-unicode.html

For sure if you try to store utf-8 characters in an iso-8859-1 table, you will
waste up the space a lot faster for cjk text. If using utf-8/ucs-2, then one
character should logically take one space, no matter if it's one-byte
sequence, two-byte sequence or three-byte sequence.


alt.php.sql had IMHO been a lot better newsgroup to ask this question.


//Aho
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com