[OSM-dev] osmosis utf-8
Martijn van Oosterhout
kleptog at gmail.com
Wed Nov 7 10:32:47 GMT 2007
On Nov 6, 2007 11:01 PM, Brett Henderson <brett at bretth.com> wrote:
> Last night I also tried running the "set names 'latin1'" statement from
> code. The JDBC driver documentation explicitly says not to use this
> command because the driver won't detect the change. Sounded perfect but
> again seemed to make no difference which surprised me.
I thought of another solution for the short term. The problem is that
the characters are double encoded, because the rails code is
connecting as latin1 but sending utf8. If you set osmosis so that it
treats the input and output OSM files as latin1 then data will be
borked inside osmosis but on disk it would look like the utf-8 the
rails server sees.
>From the docs it seems you only need to build an OutputStreamWriter
around the file with the encoding "ISO-8859-1".
Does help if you're writing to a DB though.
Hope this helps,
--
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev
mailing list