Unix Technical Forum

Re: [GENERAL] russian case-insensitive regexp search not working

This is a discussion on Re: [GENERAL] russian case-insensitive regexp search not working within the pgsql Hackers forums, part of the PostgreSQL category; --> On Thu, 12 Jul 2007, alexander lunyov wrote: > Oleg Bartunov wrote: >> alexander, >> >> lc_ctype and lc_collate ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 09:58 PM
Oleg Bartunov
 
Posts: n/a
Default Re: [GENERAL] russian case-insensitive regexp search not working

On Thu, 12 Jul 2007, alexander lunyov wrote:

> Oleg Bartunov wrote:
>> alexander,
>>
>> lc_ctype and lc_collate can be changed only at initdb !
>> You need to read localization chapter
>> http://www.postgresql.org/docs/curre...c/charset.html

>
>
> Yes, i knew about this, but i thought maybe somehow it can be changed
> onthefly.
>
> ... (10 minutes later)
>
> Yes, now when initdb done with --locale=ru_RU.UTF-8, lower('RussianString')
> gives me 'russianstring', though, case-insensiive regexp still not working. I


confirmed, checked with --locale=ru_RU.UTF-8 and 8.2.4,CVS HEAD.
No problem with --locale ru_RU.KOI8-R

> guess i'll stick with lower() ~ lower() construction.
>
> And thanks everybody who replied!
>
>>
>>
>> Oleg
>> On Thu, 12 Jul 2007, alexander lunyov wrote:
>>
>>> Tom Lane wrote:
>>>> alexander lunyov <lan@startatom.ru> writes:
>>>>> With this i just wanted to say that lower() doesn't work at all on
>>>>> russian unicode characters,
>>>>
>>>> In that case you're using the wrong locale (ie, not russian unicode).
>>>> Check "show lc_ctype".
>>>
>>> db=> SHOW LC_CTYPE;
>>> lc_ctype
>>> ----------
>>> C
>>> (1 запись)
>>>
>>> db=> SHOW LC_COLLATE;
>>> lc_collate
>>> ------------
>>> C
>>> (1 запись)
>>>
>>> Where can i change this? Trying to SET this parameters gives error
>>> "parameter "lc_collate" cannot be changed"
>>>
>>>> Or [ checks back in thread... ] maybe you're using the wrong operating
>>>> system. Not so long ago FreeBSD didn't have Unicode locale support at
>>>> all; I'm not sure if 6.2 has that problem but it is worth checking.
>>>> Does it work for you to do case-insensitive russian comparisons in
>>>> "grep", for instance?
>>>
>>> I put to textfile 3 russian strings with different case of first char and
>>> grep'ed them all:
>>>
>>> # cat > textfile
>>> Зеленая
>>> Зеленодольская
>>> зеленая
>>> # grep -i зелен *
>>> textfile:Зеленая
>>> textfile:Зеленодольская
>>> textfile:зеленая
>>>
>>> So i think system is fine about unicode.
>>>
>>>

>>
>> Regards,
>> Oleg
>> __________________________________________________ ___________
>> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
>> Sternberg Astronomical Institute, Moscow University, Russia
>> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
>> phone: +007(495)939-16-83, +007(495)939-23-83

>
>


Regards,
Oleg
__________________________________________________ ___________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
---------------------------(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
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 02:31 AM.


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