Skip site navigation (1) Skip section navigation (2)

Re: Help loading data. Error code page 850

From: Michael Wood <esiotrot(at)gmail(dot)com>
To: Christopher Patrouch <cpatrouch(at)gmail(dot)com>
Cc: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Help loading data. Error code page 850
Date: 2011-02-19 12:48:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

I've added the mailing list back in.

On 19 February 2011 00:12, Christopher Patrouch <cpatrouch(at)gmail(dot)com> wrote:
> Hi Michael,
> Thanks so much for getting back to me.
> You outlined four steps.  I followed them all (until now, I didn't know I
> could click on the icon on the cmd prompt, properties, font.  There it was,
> Lucida console.)
> Then I open the PSQL console, and I still get the warning about console page
> 850 differing from 1252.  I'm actually getting confused about which one I
> should be going for.  Here's a lot of detail, but maybe I'm on the right
> track:

OK, I don't know what you mean by "open the PSQL console".  Did you
run "psql" from the console where you changed the code page and font?

> 1.  I opened up a command prompt from my user directory so I typed in cd\ to
> get to the root directory.  From there, I typed cmd.exe /c chcp 1252.  My
> computer os is in French, so I got a message that translates to "page code
> activated: 1252"

OK, after this you should change the font for this Command Prompt
window (or else use the "Update shortcut" option to change it
permanently for all future Command Prompt windows).  Then, from this
command prompt window, run the psql command or whatever non-GUI tool
you were using to import the data.

> 2.  IPostGIS, using PgAdmin III Shape Loader, I tried to load a Shape file
> (associated with two other files of the same name, one of which should have
> a .dbf extension)  again, but it fails (saying it can't find the .dbf file;
> this is inicidental...but it shows up in the directory as an Open Office
> file, even though when I open in Open Office, it shows up with a .dbf
> extension .... hmmm.  I just double-clicked on it and I get a menu "Import
> DBase Files, Character set" and it offers me a long list of choices,
> including Western Europe (Windows-1252/WinLatin 1); so I selected that one.
>  I open it, then save it.  Use the latest ODF format or Keep Format.  I
> chose Keep Current Format.  I get an error message regarding max number of
> characters and decimal places, 19 and 11, respectively. There are 20
> characters (including the decimal point).  So couldn't save it in the
> current format.

.dbf is normally used for DBase files (or similar database files), but
I don't know if that's true for your files.  I am not sure opening the
files in OpenOffice is a good idea, and saving them again from
OpenOffice is not likely to do any good, and might corrupt the results

I am not familiar with IPostGIS and have not used PgAdmin III, so I'm
not sure how this is meant to work, but I assume they are both GUI
tools and therefore should not be affected by the settings in the
Command Prompt window.

> Clearly I'm on to something regarding this particular data set, if not the
> problem in general.

I'm not convinced :)

> 3.  When I typed cmd.exe chcp 1252, I saw nothing afterwards except the
> message about the activated code page.  Then I navigated to the directory in
> which I find my psql file.  I ran the command psql and was prompted for my
> password, which I understand should be the same as that which I gave when
> installing PostgreSQL.  I got a FATAL:  password authentication failed for
> user "Cristòbal" (except the ò showed up in DOS as a Greater than or Equal

You might need to specify the username to use instead of your Windows
username.  The username for accessing PostgreSQL needn't have anything
to do with the Windows username.

> sign -- When I got my computer, I set it up using the Spanish spelling of my
> name, Cristòbal... and needless to say that has caused a lot of problems.
>  I'll never use a accent marks again for that type of thing).
> For now, I'm still stuck at the beginning.  Maybe I should reboot?

Rebooting is unlikely to improve the situation.

> Thanks again,

No problem.  I hope my e-mail helps.

> Chris

Michael Wood <esiotrot(at)gmail(dot)com>

In response to


pgsql-novice by date

Next:From: Mark KellyDate: 2011-02-19 13:25:48
Subject: Combining queries
Previous:From: JORGE MALDONADODate: 2011-02-19 01:06:02
Subject: Updating a table field with a consecutive number

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group