Re: Lexing with different charsets

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Lexing with different charsets
Date: 2004-04-14 07:58:31
Message-ID: Pine.LNX.4.44.0404140953320.4551-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2004-04-14 08:28:50 Re: Lexing with different charsets
Previous Message Fabien COELHO 2004-04-14 07:33:38 Re: Lexing with different charsets