Changes between Version 66 and Version 67 of InstallationGuidelines/PostgreSQL


Ignore:
Timestamp:
10/17/13 12:10:46 (11 years ago)
Author:
Fran Boon
Comment:

Locale issues

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/PostgreSQL

    v66 v67  
    262262== Troubleshooting ==
    263263
    264 === Install ===
     264=== Locales ===
    265265Problem:
    266266{{{
     
    285285rm -f /tmp/pgpass.sql
    286286}}}
     287
     288Problem:
     289* Trying to import a LATIN1 Shapefile into a UTF-8 table:
     290{{{
     291Unable to convert data value to UTF-8 (iconv reports "Invalid or incomplete multibyte or wide character"). Current encoding is "UTF-8". Try "LATIN1" (Western European), or one of the values described at http://www.postgresql.org/docs/current/static/multibyte.html.
     292}}}
     293
     294Solution:
     295* Export in correct encoding
     296{{{
     297shp2pgsql -s 4326 -W LATIN1 -I mylatin1shapefile.shp public.gis
     298}}}
     299
     300Problem:
     301* Want to store data in a LATIN1 table (although this is probably not a good idea!)
     302
     303Solution:
     304{{{
     305# View available locales
     306locale -a
     307# Activate LATIN1 locale
     308dpkg-reconfigure locales
     309# select en_US ISO-8859-1, OK
     310# Check available
     311locale -a
     312su -c - postgres "createdb -O gis -E LATIN1 mylatin1db -T template0 --lc-collate=en_US.ISO-8859-1 --lc-ctype=en_US.ISO-8859-1"
     313}}}
    287314=== Performance ===
    288315 * http://wiki.postgresql.org/wiki/Performance_Optimization