[postgis-users] re: shp2sql and UTF8 question on Windows

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Tue Jan 24 07:04:00 PST 2006

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Randy George
> Sent: 24 January 2006 00:05
> To: 'PostGIS Users Discussion'
> Subject: RE: [postgis-users] re: shp2sql and UTF8 question on Windows
> Hi,
> 	Thanks for the tip.
> 	I ended up using the encoding parameter from Java.io FileInputStream
> and FileOutputStream to translate from the server's default system
> encoding
> Cp1252 to Utf8. I think that does the same thing as the gnu gettext.
> BufferedReader fromCp1252 = new BufferedReader(
> new InputStreamReader(new FileInputStream("test.sql"), "Cp1252"));
> PrintWriter toUTF8 = new PrintWriter(
> new OutputStreamWriter(new FileOutputStream("test_utf8.sql"), "UTF8"));
> Perhaps a future postgis-pg81-setup-1.1.1-1.exe could build the shp2sql
> with
> the -W switch enabled.
> thanks

Hi Randy,

As suggested, the reason the -W switch doesn't work is because I don't
compile and link against libiconv in my MingW build system. This is
definitely something I can consider for a future release though. While I
don't think libiconv can be distributed with the official pginstaller
because of licensing ambiguities, I think it would be possible to include it
in the standalone executables which make the GPL license extremely clear on
the first page.

Would anyone else on the list find this functionality useful in the Windows
installers? (this is the only request I've had for libiconv support so far)

Kind regards,


WebBased Ltd
17 Research Way

T: +44 (0)1752 797131
F: +44 (0)1752 791023


This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose nor disclose or distribute its contents to any other

More information about the postgis-users mailing list