Re: UTF-8 and LIKE vs =

From: Joel <rees(at)ddcom(dot)co(dot)jp>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-general(at)postgresql(dot)org, david(at)kineticode(dot)com
Subject: Re: UTF-8 and LIKE vs =
Date: 2004-08-25 02:10:09
Message-ID: 20040825110701.AA20.REES@ddcom.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > Just want to check this --
> >
> > > > > > The following should end up posted as shift-JIS, but
> > > > > >
> > > > > > テスト
> > > > > > and
> > > > > > てすと
> > > > > >
> > > > > > should collate the same under some contexts, since it's more-or-less
> > > > > > equivalent to a variation in case.
> > > > >
> > > > > Do you mean if you search for
> > > > >
> > > > > SELECT * FROM keyword where name = 'テスト';
> > > > >
> > > > > You might expect it to return a row with name set to 'てすと'?
> > > >
> > > > If the locale machinery iw functioning correctly (and if I understand
> > > > correctly), there ought to be a setting that would allow those to
> > > > collate to the same point.
> > > >
> > > > I'm not sure what the settings would be, or if it's fully funtional yet.
> > > > Maybe Tatsuo would know? (Hope he doesn't mind me CC-ing him.)
> > >
> > > I'm not sure what the point of the original question was, but I know
> > > that
> > >
> > > SELECT * FROM keyword where name = 'テスト';
> > >
> > > should work if locale = C and encoding is either EUC_JP or UTF-8 on my
> > > standard Linux box (of course I did initdb --no-locale).
> >
> > (query is katakana)
> >
> > SELECT * FROM keyword where name = 'テスト';
> >
> >
> > returns a record whose name field is 'てすと' (hiragana)?
> >
> > Doesn't this require some LC_COLLATE flag?
>
> No.

Ick. No way to turn it off, I suppose?

> > (I suppose I should try this myself.)
>
> Actually there's a similar regression test case in
> src/test/mb/sql/euc_jp.sql(expected result is
> src/test/mb/expected/euc_jp.sql).

--
Joel <rees(at)ddcom(dot)co(dot)jp>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2004-08-25 02:21:32 Re: UTF-8 and LIKE vs =
Previous Message Joel 2004-08-25 02:06:06 Re: UTF-8 and LIKE vs =