[postgis-devel] [PostGIS] #1465: loader/Latin1 regression failure (NetBSD, postgresql 8.4.10)
PostGIS
trac at osgeo.org
Sat Jan 14 07:33:03 PST 2012
#1465: loader/Latin1 regression failure (NetBSD, postgresql 8.4.10)
---------------------------+------------------------------------------------
Reporter: gdt | Owner: mcayland
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: loader/dumper | Version: trunk
Keywords: |
---------------------------+------------------------------------------------
Comment(by gdt):
I reinitialized postgresql with LC_ALL=en_US.ISO8859-1, and the string can
be inserted, but on output it differs from expected. I'm 99% sure the
output is 8859-1 (bytes match what's in Latin1.dbf). But the expected
output has 35 bytes, and appears to be UTF-8 encoded.
With this change, the test passes
{{{
Index: regress/loader/Latin1.select.sql
===================================================================
--- regress/loader/Latin1.select.sql (revision 8814)
+++ regress/loader/Latin1.select.sql (working copy)
@@ -1 +1,2 @@
+set client_encoding to UTF8;
SELECT * FROM loadedshp;
}}}
So there seem to be two issues:
inserting UTF8 into SQL_ASCII requires a bigger varchar to account
for the expansion
Unless there's a requirement for the database to have a particular
encoding, loading/dumping both have to set the encoding.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1465#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list