Unix Technical Forum

BUG #2116: Searching text fields does not work in EUC_JP

This is a discussion on BUG #2116: Searching text fields does not work in EUC_JP within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2116 Logged by: Jon Keating Email address: jon_keating@gcnet.co.jp PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:34 AM
Jon Keating
 
Posts: n/a
Default BUG #2116: Searching text fields does not work in EUC_JP


The following bug has been logged online:

Bug reference: 2116
Logged by: Jon Keating
Email address: jon_keating@gcnet.co.jp
PostgreSQL version: 8.1.1
Operating system: Win 2003
Description: Searching text fields does not work in EUC_JP
Details:

Hello, I found a problem with 8.1.0 so I upgraded to 8.1.1 but the issue
still persists.

I have a database with the default encoding set to EUC_JP and the client
(using pgAdmin III) is set to EUC_JP as well. THe issue is the following
query:

SELECT * FROM stock WHERE name = '日経500平均'; <-- Searching by
japanese text

This query returns nothing, but if I change the name = '... to name LIKE '..
it returns the data that I expect.

On my local machine (Win XP Pro SP2), I have an older version of PostgreSQL,
8.0.3 where the search by = works as expected. I am a little leary of
upgrading to 8.1.1 on my local machine since I need it on a daily basis to
work with these kinda queries.

Thanks,
Jon

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:34 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2116: Searching text fields does not work in EUC_JP

"Jon Keating" <jon_keating@gcnet.co.jp> writes:
> I have a database with the default encoding set to EUC_JP and the client
> (using pgAdmin III) is set to EUC_JP as well.


Is the database's locale set to something that works with EUC_JP? You
can't just whack the encoding around without paying attention to having
a compatible locale setting ... and unfortunately, PG doesn't have
enough knowledge about locales to warn you when you choose a combination
that doesn't work.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 09:34 AM
Andreas Pflug
 
Posts: n/a
Default Re: BUG #2116: Searching text fields does not work in EUC_JP

Jon Keating wrote:

>
> I have a database with the default encoding set to EUC_JP and the client
> (using pgAdmin III) is set to EUC_JP as well.


pgAdmin uses Unicode (unless the DB is SQL_ASCII or MULE_INTERNAL), you
won't get happy if you change it using a SET command.

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 09:34 AM
Jon Keating
 
Posts: n/a
Default Re: BUG #2116: Searching text fields does not work in EUC_JP

Tom Lane wrote:
> Is the database's locale set to something that works with EUC_JP? You
> can't just whack the encoding around without paying attention to having
> a compatible locale setting ... and unfortunately, PG doesn't have
> enough knowledge about locales to warn you when you choose a combination
> that doesn't work.


Well, it was set to Japan_Japanese (or something similiar to that). I am
running it on a Japanese system. So, I created a new database cluster
with initdb (after struggling with runas.exe under Windows) withe a
locale of "C". I then restored my DB and it worked fine.

I find it strange that it won't search Japanese strings with a locale of
Japanese... which it defaulted to doing during the Win32 Installer.
Anyways, it would be nice to have it as an option or something. If it is
there and I didn't see it.. sorry in advance!

Jon


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:08 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com