Subject | BLOBs and CHARACTER SETS |
---|---|
Author | ericthorniley |
Post date | 2003-04-01T13:02:51Z |
I'm sure there must be some stupid mistake I'm making, but I can't
get BLOBs to use character sets in the way I expect.
I had a data stucture that included:
CREATE DOMAIN ITEMTEXT
AS VARCHAR(10000)
CHARACTER SET UNICODE_FSS;
This is bad news for performance, resulting in lots of network
traffic. So I converted it to:
CREATE DOMAIN ITEMTEXT
AS BLOB SUB_TYPE 1
SEGMENT SIZE 80
CHARACTER SET UNICODE_FSS;
Transferring the data I used (after a bit of initial manipulation)
UPDATE ITEMS
SET ITEM_TEXT = OLD_ITEM_TEXT
;
where ITEM_TEXT was the BLOB, and OLD_ITEM_TEXT the VARCHAR.
A client logged in using WIN1252 worked fine on the VARCHAR version,
but with the BLOB receives the raw UNICODE_FSS. Writing from the
client inserts WIN1252 codes in the on-disk structure, not
UNICODE_FSS. It seems as if the transliteration is not happening on
the BLOB, but works on the VARCHAR. Also if I declare the BLOB to be
WIN1252, my ISQL UPDATE ITEMS routine does not cause transliteration
to happen - the new column is a binary copy of the old one.
Can anyone suggest what I may be doing wrong?
get BLOBs to use character sets in the way I expect.
I had a data stucture that included:
CREATE DOMAIN ITEMTEXT
AS VARCHAR(10000)
CHARACTER SET UNICODE_FSS;
This is bad news for performance, resulting in lots of network
traffic. So I converted it to:
CREATE DOMAIN ITEMTEXT
AS BLOB SUB_TYPE 1
SEGMENT SIZE 80
CHARACTER SET UNICODE_FSS;
Transferring the data I used (after a bit of initial manipulation)
UPDATE ITEMS
SET ITEM_TEXT = OLD_ITEM_TEXT
;
where ITEM_TEXT was the BLOB, and OLD_ITEM_TEXT the VARCHAR.
A client logged in using WIN1252 worked fine on the VARCHAR version,
but with the BLOB receives the raw UNICODE_FSS. Writing from the
client inserts WIN1252 codes in the on-disk structure, not
UNICODE_FSS. It seems as if the transliteration is not happening on
the BLOB, but works on the VARCHAR. Also if I declare the BLOB to be
WIN1252, my ISQL UPDATE ITEMS routine does not cause transliteration
to happen - the new column is a binary copy of the old one.
Can anyone suggest what I may be doing wrong?