October 18th, 2003, 06:36 AM
Problems using LIKE with UNICODE in FB/IB
I have DB. Its definition part is below.
The problem occures when doing statements like this:
SET SQL DIALECT 3;
SET NAMES UNICODE_FSS;
CREATE DATABASE 'C:\MyProjects\ENG\IBDB\AC011.GDB'
USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 8192
DEFAULT CHARACTER SET UNICODE_FSS;
CREATE DOMAIN CH10 AS VARCHAR(10);
CREATE DOMAIN CH50 AS VARCHAR(50);
/* ... */
CREATE TABLE ROOMS (
PRJCODE INTEGER NOT NULL,
ROOMNO CH10 NOT NULL,
/* ... */
When starting the statement, FireBird/InterBase server goes down (under MS Windows, I tried IB6, FB1, FB1.5RC6). If I use 'string_in_english' instead of 'string_in_russian', the query returns right rows. The query returns right rows when DEFAULT CHARACTER SET is WIN1251. Query like
SELECT * FROM ROOMS WHERE NAME LIKE 'string_in_russian%'
(that's right: UPPER('STRING_IN_UPPER') - it described in bugs/features of FB1 as I remember) returns all rows where NAME contains cyrillic symbols. The same result (rows with all cyrillic names) when doing statement
SELECT * FROM ROOMS WHERE UPPER(NAME) LIKE UPPER('STRING_IN_RUSSIAN%')
Question: can I fix that myself? If yes, please show me how. If no, please give me an idea of construction to substitute the statements above. (I have to use UNICODE_FSS because I am going to distribute the database in various countries.)
SELECT * FROM ROOMS WHERE NAME LIKE 'string_in_russian%' COLLATE UNICODE_FSS
November 5th, 2003, 03:18 AM
I'm quite new to unicode thing don't know how to help , have you tried the support list or the developers ones? there are people who use unicode for various languages ...