[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: default character encoding for everything in debian



On Wed, Aug 12, 2009 at 11:44:36PM +0200, Harald Braumann wrote:
> On Wed, 12 Aug 2009 13:03:30 +0100
> Roger Leigh <rleigh@codelibre.net> wrote:
> 
> > On Wed, Aug 12, 2009 at 01:18:12PM +0200, Thomas Koch wrote:
> > > I'm not sure, whether a conclusion is already reached.
> > > 
> > > 1. apt-get install mysql
> > > 2. enter mysql client
> > > 3. create database test; create table test( test char(10) );
> > > 
> > > Replace mysql with whatever application you like.
> > > 
> > > What should be the encoding of database and table test in cases
> > > like the above?
> > > 
> > > Currently it's iso-something, discriminating everybody from other
> > > countries. If it would be utf-8 instead, it would have at least two
> > > advantages
> > > 
> > > - The clueless user would get a sane default
> > > - utf-8 isn't as discriminating as iso-8859-1
> > 
> > UTF-8 is the sane default choice in this situation, so long as MySQL
> > is capable of handling it.
> 
> Is that a real problem? Usually applications that use a SQL DB come
> with some script to set up the schema. If they want UTF-8, they will
> create a table with UTF-8 encoding. I wouldn't change MySQL's default
> without reason, because old scripts might rely on that behaviour.

Those "old scripts" which don't specify an encoding *are already buggy*
due to not saying what they want, implying that the default (whatever
that might be) is fine.

There's the possibility that this might cause some problems, but they
are problems in the script, not in MySQL.  Keeping using an obsolete
encoding like Latin 1 (or whatever the default currently is) prevents
any breakage, but at the expense of moving to a sane default for the
future.

> Those applications, however, should be configured to use UTF-8 by
> default (if they support it) and their DB setup scripts accordingly.

They should indeed, but if they don't then they need to explicitly
spell out what they *do* support.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature


Reply to: