[postgis-users] shp2pgsql segfault and gdb
strk at refractions.net
strk at refractions.net
Fri Sep 30 09:25:29 PDT 2005
On Fri, Sep 30, 2005 at 11:56:56AM -0400, Amos Hayes wrote:
>
> Yep. That got rid of the crash. Thank you.
Thank you for pointing out!
> Can you explain what occurs when the -W flag is specified? What do
> you get if you omit it? Does it affect how you might load it into the
> DB?
>
> I had a peek in section 4.3.2 of the docs and I don't see the option
> documented. Sorry if it's a silly question... character sets,
> encoding, and display seem like voodoo to me.
No problem, we should add it to documentation, let me know
if you find the following helpful.
<doc_snippet>
The -W defines an encoding of the input data (dbf file).
When specified all attributes of the dbf are converted to UTF-8.
The resulting .sql script will contain a command to set CLIENT ENCODING
to UTF-8, so that the backend will be able to reconvert from UTF-8
to whatever encoding the database has been created with.
</doc_snippet>
Most likely you will have a Latin1 backend, so the conversion flow
would be:
1: Latin1 -> UTF8 (shp2pgsql)
2: UTF8 -> Latin1 (sql session)
If you have a UTF8 database:
1: Latin1 -> UTF8 (shp2pgsql)
2: NO CONVERSION (sql session)
-strk;
More information about the postgis-users
mailing list