Re: Lexing with different charsets - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: Lexing with different charsets
Date
Msg-id Pine.LNX.4.44.0404140953320.4551-100000@zigo.dhs.org
Whole thread Raw
In response to Re: Lexing with different charsets  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: Lexing with different charsets  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On Wed, 14 Apr 2004, Fabien COELHO wrote:

> >   ... WHERE field1 = _latin1'FooBar' and field2 = _utf8'Åäö'
> >
> > different charsets or this is not going to work very well.
> 
> What "editor" or terminal is supposed to be able to generate text in
> different encodings depending on the part of the sentence? I don't think I
> have that in emacs. Or is it irrelevant??
> 
> I cannot see where I could use such a feature.

Applications usually generate queries. So you can do things like

printf ("SELECT * FROM foo WHERE field1 = _latin1'%s';", my_latin1_data);

for use on the terminal one would need to use some escaping/encoding much 
like is done with bytea. For example something like _latin1 H'0a660d' (but 
that is not sql-standard).

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Lexing with different charsets
Next
From: Fabien COELHO
Date:
Subject: Re: Lexing with different charsets