From: Bob G. <bo...@rc...> - 2007-05-26 08:25:27
|
On Thu, 2007-05-24 at 17:00 -0500, Bob Gustafson wrote: > On Wed, 2007-05-23 at 08:49 -0500, Bob Gustafson wrote: > > This is probably a dumb question, but here I am an english > > speaker/writer trying to create a german language database. > >=20 > > This error occurred after attempting to create the sql-ledger databas= e > > with the Germany-DATEV-SKR03 chart of accounts. > >=20 > > No multibyte encoding was selected. > >=20 > > Error! > > INSERT INTO gifi (accno,description) VALUES ('0000100', 'Aufwand > > Gesch=EF=BF=BDftsbetrieb') > > ERROR: invalid byte sequence for encoding "UTF8": 0xe46674 > > HINT: This error can also happen if the byte sequence does not match = the > > encoding expected by the server, which is controlled by > > "client_encoding". > >=20 > > -------- > >=20 > > Next step... > >=20 > > I went back to the datasete creation screen and selected Unicode UTF-= 8 > > from the drop down menu. > >=20 > > Clicking continue, I get: > >=20 > > Error! > > CREATE SEQUENCE id start 10000 > > ERROR: relation "id" already exists > >=20 > >=20 > > --------- > >=20 > > Going back to the beginning (my usual mode of operation), with: > >=20 > > template1=3D# DROP DATABASE "sql-ledger"; > > DROP DATABASE > > template1=3D#=20 > >=20 > > I then have to go back two steps to the create database screen. > >=20 > > But, alas, I get: > >=20 > > Error! > >=20 > > FATAL: database "sql-ledger" does not exist > >=20 > >=20 > > Of course it does not exist. I am trying to create it. Why the error.= . > >=20 > >=20 >=20 > Continuing on from where I left off: >=20 > Clicking the 'Delete Dataset' button on the admin.pl page gives: > Error! > Nothing to delete! >=20 > At least now sql-ledger knows there is no database. >=20 > Now, click on the 'Create Dataset' button: >=20 > I get the expected page - so far so good. >=20 > Filling in the blanks - sql-ledger, Unicode (UTF-8), and select > 'Germany-DATEV-SKR03'; click 'Continue' >=20 > The disk buzzes, and.. I get: > Error! > INSERT INTO gifi (accno,description) VALUES ('0000100', 'Aufwand > Gesch=EF=BF=BDftsbetrieb') > ERROR: invalid byte sequence for encoding "UTF8": 0xe46674 > HINT: This error can also happen if the byte sequence does not match th= e > encoding expected by the server, which is controlled by > "client_encoding". >=20 > I think I have been here before.. >=20 The Chart of Accounts files in sql/ are raw ISO_8859 and need to be converted to UTF-8 files before they can be inserted into the database. To convert all of the files starting with German* I used the commands: mkdir iout mkdir iin cp sql/German* iin # ls iin cd iin # ls -1=20 ls -1 | xargs -i iconv -f ISO_8859-1 -t UTF-8 {} -o ../iout/{} # ls -l ../iout Once the converted files are in directory iout, they can be pumped into the database by: psql sql-ledger sql-ledger=3D# \i /usr/local/sql-ledger/sql/Germany-SKR03-chart.sql sql-ledger=3D# \i /usr/local/sql-ledger/sql/Germany-SKR03-gifi.sql Now I do see listings in the Chart of Accounts, but still have sql errors when I try to insert data. (I don't know what to put in all of the text entries, so I leave some blank. Maybe this is the problem). I do have the Manual, but it is like many other technical manuals. You have to read it a couple of times from page 1 to page 284, then remember what you have read. Then attempt to install and populate the database. |