[JDBC] Re: A bug with pgsql 7.1/jdbc and non-ascii (8-bit) chars?
On Thu, 3 May 2001, Barry Lind wrote: With regards to your specific problem, my guess is that you haven't created you database with the proper character set for the data you are storing in it. I am guessing you simply used the default SQL Acsii character set for your created database and therefore only the first 127 characters are defined. Any characters above 127 will be returned by java as ?'s. If this is the case you will need to recreate your database with the proper character set for the data you are storing in it and then everything should be fine. Thanks, you are right! The main problem was that I had not enabled the multibyte support for database. (I believe fairytale and supposed that correct locale setting will be enough.) So my humble wish is that the instructions in the INSTALL file should be corrected. Because: --enable-multibyte Allows the use of multibyte character encodings. This is primarily for languages like Japanese, Korean, and Chinese. Read the Administrator's Guide for details. I think that this is a little bit missleading. There is correct information in the Administrator's Guide, so I should have to read the Guide, but but... The world would be much better place, if there is little mention in the installation instruction that this concerns also 8-bit chars... But anyway, it works now very fine, thanks! BR, Jani --- Jani Averbach ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[JDBC] A bug with pgsql 7.1/jdbc and non-ascii (8-bit) chars?
Hi! I have a problem like that: Environment: The database is postgresql v7.1, with locale-support jdk is sun's jdk1.3.0_02 and jdbc is that one which comes with postgres (type 2). Both database and jdbc driver has been build by myself. OS: RH 6.2 based linux with 2.4.3 kernel, glibc 2.1.3. The problem: There is a database which contains fields (the field's type is 'text') with scandinavian alphabet. (Especially ÖÄÅöäå (odiaeresis, adiaeresis, aring, or in other words, oe, ae, and a with ring above it)). The database has been installed, created and used under LC_ALL=finnish and LANG=fi_FI environment variables in act. Ok, the problem: When I try to read those field, I get guestion marks instead of those 8-bit scandic chars. I have been check my java programs and the database. (in fact, same problem appears with postgres-7.1/src/interfaces/jdbc/example/psql.java). In general, my java environment works fine with 8-bit chars, with psgl (not the java one) there is everything very well with those fields with 8-bit chars. So my question is, am I doing something wrong, or is there a bug in the pgsql-jdbc? If this is a bug or you need otherwise help or more information, please let me know. I will try to help as much as possible to hunt this one down. If I am doing something stupid, I would very likely to know it... BR, Jani --- Jani Averbach ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html