[postgis-devel] Re: [Fwd: PostGIS : shp2pgsql i18n patch.]
IIDA Tetsushi
hogepiyo at nifty.com
Sat Jan 15 00:49:55 PST 2005
strk,
I checked rc1 now. Please let me point some out.
the patch for explanation was placed.
http://oi.nu/shp2pgsql/shp2pgsql.c.diff.txt
---
1) a UTF8 buffer is too short.
The single byte character that is not compatible with ASCII,
it is mainly changed into a 3 bytes UTF8 character.
for example, in Shift_JIS, Single byte character 0x7e (overline)
and The character of the range of 0xA1-0xDF (HALFWIDTH
KATAKANA) is changed into a 3 bytes UTF-8 character.
sample shapefile -> http://oi.nu/shp2pgsql/kanashape.zip
2) Escaping when both quote and backslash exist is not good.
It is not processed even if a backslash is before the position
in which the quote was found first.
# The reason which was being made pointer processing with the
# original patch is this.
3) #if USE_ICONV -> #ifdef USE_ICONV
at line 423.
--
IIDA Tetsushi
(mailto : Iida_Tetsushi at oi.nu)
----- Original Message -----
From: <strk at refractions.net>
To: "IIDA Tetsushi" <hogepiyo at nifty.com>;
<postgis-devel at postgis.refractions.net>; "Jeff Lounsbury"
<jeffloun at refractions.net>; "Paul Ramsey" <paul at refractions.net>
Sent: Thursday, January 13, 2005 2:02 AM
Subject: Re: [postgis-devel] Re: [Fwd: PostGIS : shp2pgsql i18n patch.]
> Tetsushi, hackers,
> I've added an optional support for UTF8 output in shp2pgsql.
> To enable you have to set USE_ICONV to 1 in globale Makefile.config
> or in the environment.
>
> It defaults to 0 for easy of testing and because other compiler/linker
> flags might be needed in that case (I don't need -liconv on my host,
> your iconv.h might be somewere else, etc. etc.).
>
> If you handle to build it with USE_ICONV=1 you'll have a -W <encoding>
> flag. The value of <encoding> will be used for a 'SET CLIENT_ENCODING TO'
> command in the head of output code, there are probably issues there as
> well as postgresql will be more picky then iconv at recognizing (let
> alone supporting) different encoding names.
>
> Consider it as an alpha feature, and only use for testing.
> Tetsushi, please report any problem you might encounter with this.
>
> --strk;
>
More information about the postgis-devel
mailing list