From: Stuart L. <sl...@cc...> - 2008-02-07 19:19:13
|
Hello, We have customers with accented characters such as é in their names, but when I try to enter them as, for example, u+00e9 I get this error message: DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding "UNICODE": 0xe9272c I'm running SQL Ledger 2.6.22 on Linux with Postgres 8.0.13. Thanks in advance for any help. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=- Kernel 2.6.23-gentoo-r3 The wise man seeks everything in himself; the ignorant man tries to get everything from somebody else. |
From: Bernd P. <bp...@ch...> - 2008-02-15 08:52:40
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 14 Feb 2008 23:57:13 -0800 sql...@li... wrote: > Message: 8 > Date: Thu, 07 Feb 2008 13:19:12 -0600 > From: Stuart Luppescu <sl...@cc...> > Subject: [SL] Trouble entering unicode characters > To: sql...@li... > Message-ID: <120...@mu...> > Content-Type: text/plain; charset=UTF-8 > > Hello, We have customers with accented characters such as ? in their > names, but when I try to enter them as, for example, u+00e9 I get this > error message: > > DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding > "UNICODE": 0xe9272c > > I'm running SQL Ledger 2.6.22 on Linux with Postgres 8.0.13. Thanks in > advance for any help. > -- > Stuart Luppescu -=- slu .at. ccsr.uchicago.edu > University of Chicago -=- CCSR > ???????? -=- Kernel 2.6.23-gentoo-r3 > The wise man seeks everything in himself; the > ignorant man tries to get everything from somebody > else. > > First, your system must be set to Unicode. Seems that you're in the US. So, you need a directory called 'locale/en_utf' containing at least a file called 'all'. At the top of the file place a line like: $self{charset} = 'UTF-8'; This should enable you to enter Unicode characters. Then for printing the fonts you installed must include any special character you might want to use. There shouldn't be a problem for French characters though. Regards, Bernd - -- プラゲ ベェアント - Bernd Plagge ファースト・チョイス・インターネット(有) First Choice Internet Ltd., Tokyo Tel. 03-4500-7799 Fax. 03-4400-3723 mail: bp...@ch... url: http://www.choicenet.ne.jp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHtVIOpYU8M8PbPV4RAuK0AJ4uhY9B49psdcFqMYHWufhrf0aLNwCfbGp8 t8dJkwouFsP2Ijl7YDzLjUQ= =6gvD -----END PGP SIGNATURE----- |
From: Stuart L. <sl...@cc...> - 2008-02-15 14:42:54
|
On 金, 2008-02-15 at 17:49 +0900, Bernd Plagge wrote: > First, your system must be set to Unicode. > Seems that you're in the US. So, you need a directory called > 'locale/en_utf' containing at least a file called 'all'. At the top of > the file place a line like: > > $self{charset} = 'UTF-8'; Where does this directory go? I have a /usr/lib/locale/en_US.utf8 directory with all the LC_* files in it. Do I put it there? Also, do I need to restart services after I do this? Thanks. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=- Kernel 2.6.23-gentoo-r3 <Mongoose> knghtbrd: and the meek shall inherit k-mart |
From: Rolf S. (tokon) <in...@to...> - 2008-02-15 18:59:25
|
Stuart Luppescu schrieb: > Where does this directory go? The paths are: /usr/local/sql-ledger/locale/ for the language folders and /usr/local/sql-ledger/templates/<name of your folder>/ for your templates. > Also, do I need to restart services after I do this? No, you don't have to. |
From: Rolf S. (tokon) <in...@to...> - 2008-02-15 15:23:43
|
Bernd Plagge schrieb: > First, your system must be set to Unicode... Thanks to Bernd. His infos should solve your input problems (and helped me a lot, too). In detail, do this: - Create a directory "en_utf" - Copy from ca_en the file "all", "LANGUAGE" and "locales.pl" - LANGUAGE: replace "English/Canada" with "English (UTF-8)" - all: Insert the line "$self{charset} = 'UTF-8';" and save it as unicode file - run "perl locales.pl" - in the admin interface, change the language of your user to "English (UTF-8)" Now about printing: Make a backup copy of your templates. Edit them and replace the line "\usepackage[latin1]{inputenc}" with "\usepackage[utf8]{inputenc}" Save them in unicode format. As long as the templates consist only of standard ASCII characters, you shouldn't have to edit anything else. Like this I was able to enter French (é à è), German (ä ö ü) and Hungarian characters (ű ő ó í) and print them in the same document; so unicode really works with the correct set up. :) |
From: Rolf S. (tokon) <in...@to...> - 2008-02-14 19:00:35
|
1. Are you sure your database supports unicode? Log in with pqsl to your db and type "show client_encoding;". 2. I made some tests with an UTF database and wasn't able to create correct PDF outputs. I'm not completely sure, but it seems to me that you have much less trouble if you use the Latin1 charset if you need French characters. Greetings Rolf Stuart Luppescu schrieb: > Hello, We have customers with accented characters such as é in their > names, but when I try to enter them as, for example, u+00e9 I get this > error message: > > DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding > "UNICODE": 0xe9272c > > I'm running SQL Ledger 2.6.22 on Linux with Postgres 8.0.13. Thanks in > advance for any help. |
From: Stuart L. <sl...@cc...> - 2008-02-14 20:36:33
|
On 木, 2008-02-14 at 20:00 +0100, "Rolf Stöckli (tokon)" wrote: > 1. Are you sure your database supports unicode? Log in with pqsl to your > db and type "show client_encoding;". Here's what I get: show client_encoding; client_encoding ----------------- UNICODE (1 row) > 2. I made some tests with an UTF database and wasn't able to create > correct PDF outputs. I'm not completely sure, but it seems to me that > you have much less trouble if you use the Latin1 charset if you need > French characters. I would, but I don't know how to enter such characters. I can use my input method editor (scim) to input unicode directly, but I don't know how to enter Latin1. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=- Kernel 2.6.23-gentoo-r3 [It is] best to confuse only one issue at a time. -- K&R |
From: Rolf S. (tokon) <in...@to...> - 2008-02-14 21:36:29
|
Stuart Luppescu schrieb: > I would, but I don't know how to enter such characters. I can use my > input method editor (scim) to input unicode directly, but I don't know > how to enter Latin1. I hope I understand correctly that you work on a Linux client and use Scim to enter text into the web browser. So maybe the HTTP request isn't sent in the correct charset to the server. I'm not sure about that, but I got similar error messages when I tried to restore a Latin1 backup into a Unicode database. I hope an SQL-Ledger insider knows more. (Me, I've installed SQL-Ledger on OpenSUSE, but work on a Windows client. Because I live in Switzerland, I'm lucky to have the French characters on my keyboard. For other languages I just switch the keyboard definition, on Linux too, and never had troubles with that. If you switch to Swiss-French layout, press ";" for "é", "'" for "à" and "[" for "è".) The other problem to consider is how you can print unicode characters to PDF and postscript. That's a LaTeX problem that I was not yet able to solve. Because of that I created a Latin1 database after a few tests with unicode. At your place I would connect a Windows client, enter some French words and check if your templates work properly, before you use too many time in editing your database. |