473,811 Members | 3,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

case insensitive search with greek characters

Hi all,

I 'm testing postgres 8.0 beta 1 an i have the following problem. I have
a field with value ÃéÜííçò. If i execute the following query it does not
returns any rows.

select * from test where descr ilike '%ãéáííçò%'

if i change the query to

select * from test where descr ilike '%ãéÜííçò%'

everything is fine. As you can see the problem is at char á .
I 'm using ENCODING = 'ISO_8859_7'. I also tried with unicode but no luck.

An suggestions?

Thanks,
Gvre
Nov 23 '05 #1
4 2593
Giannis Vrentzos <gv**@NOSPAM.gv re.gr> writes:
... everything is fine. As you can see the problem is at char á .
I 'm using ENCODING = 'ISO_8859_7'. I also tried with unicode but no luck.


upper/lower casing behavior depends on locale, not encoding (though you
also need to be sure your encoding is what the selected locale expects).
I suspect you initdb'd with the wrong locale environment settings.
Check by doing
show lc_ctype;
show lc_collate;
If it's not the right thing then you'll need to re-initdb :-(

regards, tom lane

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

Nov 23 '05 #2
Giannis Vrentzos wrote:
I 'm testing postgres 8.0 beta 1 an i have the following problem. I
have a field with value ÃéÜííçò. If i execute the following query it
does not returns any rows.

select * from test where descr ilike '%ãéáííçò%'

if i change the query to

select * from test where descr ilike '%ãéÜííçò%'

everything is fine. As you can see the problem is at char á .


As far as I can see, this is correct, because the pattern in the second
query indeed does match you value whereas the first doesn't. Did you
expect ilike to be accent-insensitive? It is not.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #3
Tom Lane wrote:
Giannis Vrentzos <gv**@NOSPAM.gv re.gr> writes:
... everything is fine. As you can see the problem is at char á .
I 'm using ENCODING = 'ISO_8859_7'. I also tried with unicode but no luck.

upper/lower casing behavior depends on locale, not encoding (though you
also need to be sure your encoding is what the selected locale expects).
I suspect you initdb'd with the wrong locale environment settings.
Check by doing
show lc_ctype;
show lc_collate;
If it's not the right thing then you'll need to re-initdb :-(


The problem is not with upper-lower case but with one letter (á) and
(Ü). I executed show lc_ctype and show lc_collate and postgres returned
'Greek_Greece.1 253' and i cannot find an encode like this in postgres. I
also don't want to change the encoding every time i change the db server
machine.

Thanks for responding,
Gvre
Nov 23 '05 #4
Tom Lane wrote:
Giannis Vrentzos <gv**@NOSPAM.gv re.gr> writes:
... everything is fine. As you can see the problem is at char á .
I 'm using ENCODING = 'ISO_8859_7'. I also tried with unicode but no luck.

upper/lower casing behavior depends on locale, not encoding (though you
also need to be sure your encoding is what the selected locale expects).
I suspect you initdb'd with the wrong locale environment settings.
Check by doing
show lc_ctype;
show lc_collate;
If it's not the right thing then you'll need to re-initdb :-(


The problem is not with upper-lower case but with one letter (á) and
(Ü). I executed show lc_ctype and show lc_collate and postgres returned
'Greek_Greece.1 253' and i cannot find an encode like this in postgres. I
also don't want to change the encoding every time i change the db server
machine.

Thanks for responding,
Gvre
Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3113
by: Thomas Philips | last post by:
Using glob(), I obtain a list of filenames with some characters in upper case, others in lower case. I want to rename the files by replacing one substring in each filename with another, but with two twists. 1. The search must be case insensitive 2. After portion of the filename that does not match the search string must not have its case changed. For example, if fn="AlphaMin.txt", searchstring="min" and
2
10318
by: Tom | last post by:
Hi, Our development team is adding DB2 8.1 compatibility to our existing application which currently supports SQLServer 2000. Our code is written to take advantage of SQLServer's ability to allow query string compares to be case insensitive. We have identified DB2 forces all query string compares to be evaluated case sensitive. Since our code is written to assume case insensitivity, it curently seems that we must change our code...
10
9698
by: JohnR | last post by:
I have an arraylist of string values. I would like to search the arraylist to find the index of a particular string and I would like the search to be case insensitive. dim al as new arraylist al.add("one") al.add("two") dim x as integer = al.indexof("ONE") I would like this to find the match and return 0
14
2036
by: henrik.sorensen | last post by:
Hi List, I am looking for a way to do a case insensitive search for file names. Anybody have some hints ? thanks Henrik pl1gcc.sourceforge.net
1
5533
by: benhoefer | last post by:
I have been searching around and have not been able to find any info on this. I have a unique situation where I need a case sensitive map: std::map<string, intimap; I need to be able to run a find on this map with a case sensitive AND case insensitive search. I need to be able to change this dynamically during execution. Is this possible? Any thoughts on this? I understand that I can make the map case insensitive, but that is not...
4
8183
by: bb | last post by:
Hi, void fun(const std::map<std::string,int>& m1) { // How to make a case insensitive search of this map without making a copy? } cheers.
1
11775
by: Coder Guy | last post by:
Is it possible to do a case insensitive comparison of individual characters? I tried: Char.ToLowerInvariant(charA).CompareTo(Char.ToLowerInvariant(charB)) And though it works for the most part, it didn't seem to work for all locales. I tried converting the characters to a string and then do a case insensitive comparison, and this always worked. Unfortunately this comparison is being
3
7089
by: Gordowey | last post by:
Hi all, I have an easy question. I have a table with names, for example name -------- José José Albert ALBERT
0
5101
by: J. Cliff Dyer | last post by:
Please keep the discussion on-list. On Fri, 2008-09-05 at 15:36 +0200, Maric Michaud wrote: That does not get the same behavior as the OP's original solution. The OP's solution retrieves the first matching value only. Mine gets one arbitrary matching value, determined by the algorithm used for constructing the search dict (not specified in my solution). What the OP actually said was that he can't throw away the case. You assume...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10408
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10137
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7673
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.