[OSM-dev] Unicode Errors On Insert
Tom Hughes
tom at compton.nu
Wed Jul 25 12:57:45 BST 2007
In message <46A737D0.5060002 at bretth.com>
Brett Henderson <brett at bretth.com> wrote:
> I've fixed the problem, my tables on the windows machine were actually
> latin1 even though the server was set to utf8.
>
> I created the database schema on the windows machine using my script at:
> http://www.bretth.com/osmosis/osm_schema_latest.sql
>
> The script was created using mysqldump from my linux schema which was
> originally created using the ruby rake tool. The script explicitly sets
> the table type to latin1. This means that although the server reports
> itself as utf8, the tables are actually latin1. The utf8 which would
> otherwise have been converted to latin1 remains as utf8 which fails on
> insert. Modifying the script to create tables as utf8 has fixed the
> problem.
The rake migrate stuff only creates the tables IIRC, not the database
itself. You need to make utf8 the default when creating the db:
create database openstreetmap default character set utf8
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the dev
mailing list