473,791 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does this use of accents in psql fail for a Unicode database?

Hi,

I noticed that queries from one of my php-clients were failing when they
contained certain accented characters, but upon trying the same thing in
psql, it showed failure there as well. Strangely enough, at least one
character is working o.k.

Could someone enlighten my why....?

(using SuSE v9.0)

db=# select version();
version
------------------------------------------------------------------------
PostgreSQL 7.4.1 on i586-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3
(1 row)

db=# \l
List of databases
Name | Owner | Encoding
---------------+----------+----------
db | vugtf | UNICODE
<cut>
(6 rows)

This database was created using '--no-locale' as initdb-parameter
The postgres.conf contains

db=# \encoding
UNICODE

db=#create table f_test(value text);
CREATE TABLE

megafox=# insert into f_test values ('¤');
INSERT 2518547 1

db=# insert into f_test values ('ç');
db'#
<ctrl>+<c>

db=# insert into f_test values ('õ');
db'#
<ctrl>+<c>

db=# insert into f_test values ('é');
db'#
<ctrl>+<c>

megafox=# insert into f_test values ('één');
ERROR: invalid byte sequence for encoding "UNICODE": 0xe9e96e
=> the insert that succeeds is that of a Euro-sign

=> all accented characters including the Euro are created using a composekey

=> I guess in the last insert, the two hidden '-characters work as a pair....
Any hints on what's causing this behaviour are welcomed..... ;-)


--
Best,

Frank.
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
0 1266

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6367
by: c w | last post by:
Can anyone point me in the right direction? Using Oracle 9i, Pro*C and Excel. I am trying to print french accents from the Oracle DB using Pro*C to extract the necessary info and sent the result to Excel but at the moment I cannot get the accents to show in Excel. The NLS_LANG is America. Any help would be appreciated. Thanks. Colin
3
8759
by: Cherif Diallo | last post by:
Hi I have a trivial question for the experts. I would lilke to read be able to read a text file that could contain french characters with accents. I'm opening the file with the File.openText(...) and then loop through the file with the Readline function into a string variable. But everytime a hit a char with an accent I loses it. Example : père reads pre
15
12351
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); but i want to execute this script from the client and so my blob-data is
6
5624
by: peter pilsl | last post by:
postgres 7.3.2 I store unicode-data in postgresql. The data is retrieved via webinterfaces, processed with perl and then stored in postgresql (and viceversa). All is going nice with one problem. If performing a "select * order by field"-query the result is not what I expected. German umlauts (ie: Ö) are stored as doublechars ("Ö" is "Ö") and only the first char seems to be taken into account when sorting.
3
4423
by: Erwin Brandstetter | last post by:
Created a new 7.4 database. # create database foo with encoding = UNICODE; Then tried to restore my dump from pg 7.2 which was SQL-ASCII or Latin1 encoded (cant tell which of the two, only got the dump of the old database left after upgrading postgresql.) Succeeded creating the objects, but no data was restored, instead postgresql complained about illegal UNICODE characters. Also export of an MS-Access Database with pgAdmin 1.6 failed...
10
2187
by: Carlos Ojea Castro | last post by:
Hello: I have postgreSQL 7.4.1 installed, but I can't start psql (I was able to start psql a few weeks ago...) I get this message: debian-ojea:/home/carlos# psql buques_db /usr/lib/postgresql/bin/psql: relocation error: /usr/local/lib/libreadline.so.4: undefined symbol: BC Anyone knows what is happening?
2
1762
by: Russ Brown | last post by:
Hello, Today I tried connecting to my database locally via psql. I got the usual welcome & basic help messages, but it never got to the prompt: it just hung. So I checked top and the psql process was increasing in size at quite a rate (up to a gig in under 30 seconds). I'd been using psql with no problems only a couple of hours ago, and I haven't installed anything for at least a couple of days that I can think of.
5
4521
by: Gabriel Marinello | last post by:
I am Latinanmerican an I would like to knonw how make accents using printlf. Thanks.
9
19545
by: albert | last post by:
Hi, I can't get the characters with accents in a regex. This is my code : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var MyText1 = "éléphant1" ; var MyText2 = "elephant1" ; var MyReg = /^+$/ ; if(MyReg.test(MyText1)) alert(MyText1 + " is OK") ;
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.