0

I installed PostgreSQL as part of the OpenGeo Suite and now I need to create a new database with LATIN1 encoding since I need to preserve accents. Problem is that when I try to create the new DB using pgAdminIII, I get an error message telling me that ---encoding LATIN1 does not match locale "Spanish_Mexico.1252"--- I tried creating a new Database Cluster using

postgres$ initdb --locale LATIN1 -D E:/mydb

But I got no result at all.

Tried issuing some other commands on command line and everything I did showed no result at all.

I´m totally new in to Posgresql and data base management so any advice would be appreciated

gallysam
  • 111
  • 3
  • Forgot to mention that I`m on Windows 7... – gallysam May 03 '14 at 05:11
  • Use `WIN1252` for the encoding, as suggested in the error message. – Daniel Vérité May 03 '14 at 17:22
  • Ok, That somehow works... But in order to do that I must use "template0" to create the DB. The resulting DB allows me to save the characters ok... BUT.... Somehow the DB is different from the ones I create using template1 cause geoserver is not able to get the srid from the table. i´m quite lost here... – gallysam May 05 '14 at 15:52
  • Do you mean you recreated the cluster (initdb) with WIN1252 encoding or did you created a WIN1252 db inside the pre-existing LATIN1 cluster? – Daniel Vérité May 05 '14 at 15:57
  • cluster was created by the instalation so I dont know what encoding it is. I need a table with encoding WIN1252 or Latin1 but I´m unable to create it using template1. I created a new database with encoding WIN1252 but pgadmin wont let me do that using the template1 so I did it using template0. The resulting DB is in WIN1252 and seems identical to the ones created using template1 but geoserver wont read them fine – gallysam May 05 '14 at 16:08
  • digginfg more into the problem the problems seems to be in the suer conecting to the DB from GeoServer. Some how that user has access to the database but cant read the geom data... will try to give more permissions to the user – gallysam May 05 '14 at 17:21

0 Answers0