Page 1 of 1

Why ODAC not support UFT8 ? and How to do with thus oracle datasource? Thanks!

Posted: Fri 23 Dec 2005 02:30
by 20494
as title,thanks!

Posted: Fri 23 Dec 2005 08:24
by nschmied
ODAC support UTF8, read the odac.hlp.

I use ODAC in UTF8 with VCL and VCL.NET in Delphi2005

Posted: Fri 23 Dec 2005 10:00
by Challenger
ODAC supports UTF8. To work with UTF8 you should set charset property of TOraSession to
AL32UTF8 and set CharLength property to 0.

Posted: Mon 26 Dec 2005 10:17
by fandm
challenger wrote:ODAC supports UTF8. To work with UTF8 you should set charset property of TOraSession to
AL32UTF8 and set CharLength property to 0.
Добрый день.
Я хотел бы уточнить. Дело в том, что AL32UTF8 есть только в 9-ке и выше, а в 8-ке нет. Как быть? Oracle выдаёт ошибку ORA-12704.

И ещё. В 9-ке ставлю как Вы рекомендовали AL32UTF8 и CharLength = 0, но после вставки данных в таблицу введённые символы отображаются как эквиваленты из английского алфавита. Т.е. я ввожу символ з, а в базу ложится обычная c. Для ввода данных использую компоненты Delphi, поддерживающие Unicode. Не подскажете в чём может быть проблема???

Posted: Mon 26 Dec 2005 11:58
by Alex
Please write your forum posts in English or send us your requests by E-mail.

Posted: Mon 26 Dec 2005 18:20
by fandm
Alex wrote:Please write your forum posts in English or send us your requests by E-mail.
Sorry.
I would like to specify. The matter is that AL32UTF8 is only in Oracle 9 and above, and in Oracle 8 is not present. How to be? At included option UseUnicode and attempt to insert data in table Oracle allways gives out mistake ORA-12704. And still.

In database Oracle 9 I have established CHARSET=UTF8, and have established at TOraSession CharLength = 0, Charset = ", UseUnicode=True, but after an insert of data in the table (Post and AutoCommit and Refresh) the entered symbols are displayed as one-byte equivalents or symbols '?'. I.e. I enter a symbol з and in database enters symbol c, and instead I enter a symbol '#601'; and in database enters symbol '?'. For data input I use "TntWare Delphi Unicode Controls" (http://www.tntware.com/delphicontrols/unicode/). During too time at use "TOAD International Edition 7.5.3" (http://www.quest.com/toad/index.asp) all symbols are correctly kept in the specified database. Will not prompt in what there can be a problem? Thank's very much.

P.S. I use ODAC 5.55.1.22 and Net=True.

Posted: Wed 28 Dec 2005 13:25
by Challenger
If you set UseUnicode to True then Charset property is ignored. Therefore you work with UTF16.
If you want to work with UTF8 strings on Oracle 8 you should set Charset property to "UTF8" , CharLength
property to 0 and UseUnicode to False. To work with UTF8 strings you can use UTF8Encode and UTF8Decode Delphi functions.