Opened 5 years ago

#5132 new defect

OGR SQL ILIKE is case sensitive with non-latin letters

Reported by: marisn Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.9.2
Severity: normal Keywords:
Cc:

Description

Although documentation states LIKE and ILIKE being case-insensitive, both are case sensitive if pattern contains non-latin letter.

Shortened output demonstrating case:

GDAL 1.9.2, released 2012/10/08

ogrinfo -sql "select count(NOSAUKUMS) from pilsetas where NOSAUKUMS ilike '%ā%'" pilsetas.shp
COUNT_NOSAUKUMS (Integer) = 8
ogrinfo -sql "select count(NOSAUKUMS) from pilsetas where NOSAUKUMS like '%ā%'" pilsetas.shp
COUNT_NOSAUKUMS (Integer) = 8

ogrinfo -sql "select count(NOSAUKUMS) from pilsetas where NOSAUKUMS ilike '%Ā%'" pilsetas.shp
COUNT_NOSAUKUMS (Integer) = 2
ogrinfo -sql "select count(NOSAUKUMS) from pilsetas where NOSAUKUMS like '%Ā%'" pilsetas.shp
COUNT_NOSAUKUMS (Integer) = 2

As it's visible from the output, count should be 10 if ILIKE is case-insensitive. Example works as expected (LIKE and ILIKE both are case-insensitive) when using plain "a" letter.

Change History (0)

Note: See TracTickets for help on using tickets.