[OSM-dev] UTF-8 problem with API 0.5 planet.osm and osmosis 0.16

Brett Henderson brett at bretth.com
Sun Sep 23 00:52:13 BST 2007


Tom Hughes wrote:
> You probably didn't make UTF-8 the default character set for the
> database when you created it.
>
> Tom
>   
That sounds about right.  The 0.5 schema script I downloaded which may 
not be the latest contains a number of tables with "DEFAULT 
CHARSET=latin1" defined.

As an FYI, a simple way to avoid all of these problems (at least I think 
it does), is to add the following options to your /etc/my.cnf.

Under [mysql]
default-character-set=utf8

Under [mysqld]
default-character-set=utf8

I don't know what type of mysql setup debian has out of the box but on 
fedora core 6 that was enough to make the "status" command in mysql show 
the following lines:
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8

Just be careful if you have any other apps on the same box that may be 
impacted.

Cheers,
Brett





More information about the dev mailing list