Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old October 18th, 2003, 06:36 AM
Pashik Pashik is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Russia
Posts: 1 Pashik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Problems using LIKE with UNICODE in FB/IB

Hi!
I have DB. Its definition part is below.
Code:
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,
  NAME         CH50
  /* ... */
);

The problem occures when doing statements like this:
Code:
SELECT * FROM ROOMS WHERE NAME LIKE 'string_in_russian%'

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
Code:
SELECT * FROM ROOMS WHERE UPPER(NAME) LIKE UPPER('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
Code:
SELECT * FROM ROOMS WHERE NAME LIKE 'string_in_russian%' COLLATE UNICODE_FSS


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.)

Reply With Quote
  #2  
Old November 5th, 2003, 03:18 AM
mariuz's Avatar
mariuz mariuz is offline
Bug Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Transylvania (Romania)
Posts: 274 mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 19 h 57 m 57 sec
Reputation Power: 9
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 ...

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Problems using LIKE with UNICODE in FB/IB


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway