Board index » cppbuilder » BDE, VCL, Unicode and Oracle

BDE, VCL, Unicode and Oracle


2004-09-09 09:29:01 PM
cppbuilder67
Dear all,
I have a system where most of applications were developped on BCB6. This
system has an Oracle database as main data storage. These applications
use BDE components to access Oracle, based on the Oracle ODBC Driver to
the data source, and show most of information on DBGrid's.
We developped this system considering Oracle based on CHARSET for west
european countries (WE8ISO8859P1), but now he have to support also asian
characters.
Decision:
On the Oracle side we decide to use the single multilingual server
approach. It means the database will have UTF8 as default CHARSET, as
well as the clients, and AL16UTF16 for NATIONAL CHARSET.
Problem:
After some weeks analysing and testing both Oracle and Borland sides, I
still have problems to display correctly asian characters on DBGrid's in
a test application.
Tests:
-Set Local NLSLANG=UTF8
-Query: select '???', substr(dump('???',1016),1,70) from dual
-Result: Character not showed correctly in Field1, but correctly in the
title.
Displayed in Field1:
???? = bytes:e697a5e69cace8aa;
UCS-2:003F4EA4EBF196A4;
UTF8:3FE4BAA4EEAFB1E99AA4
Displayed in Field2:
CharacterSet=UTF8: e6,97,a5,e6,9c,ac,e8,aa,9e
If I still make a query on a test table, where it exists a VARCHAR2
column and another NVARCHAR2 column, I do not get any result from the
NVARCHAR2 one, and still the VARCHAR2 column displays something similar
as above.
Questions:
1) Does VCL support Unicode characters? When I copy and paste chinese
characters from IE into a VCL test application, my Edit fields show it
correctly. But to get them from notepad I have to manipulate the
Clipboard to get WideString text, otherwise VCL shows something like '???'.
2) What should I do to be unicode compliant using VCL, BDE and Oracle?
Thanks,
Marcelo Leister.
 
 

Re:BDE, VCL, Unicode and Oracle

we use DOA 4 ( www.allroundautomations.com ) + BCB6E + Tnt Components (
tnt.ccci.org/delphi_unicode_controls/ ) + Oracle 9 / 10.
this combination works absolutely fine with UTF8 as default CHARSET in the
Oracle DBs.
you need to be aware that you need to call UTF8Decode on UTF8-based strings
to get the correct WideString...
HTH
Yahia
 

Re:BDE, VCL, Unicode and Oracle

Dear all,
I have a system where most of applications were developped on BCB6. This
system has an Oracle database as main data storage, and a Paradox local
database (subset from the main one) in case of Oracle unavailability.
These applications use BDE components to access Oracle, based on the
Oracle ODBC Driver to the data source, and show most of information on
DBGrid's.
We developped this system considering Oracle based on CHARSET for west
european countries (WE8ISO8859P1), but now he have to support also asian
characters.
Decision:
On the Oracle side we decide to use the single multilingual server
approach. It means the database will have UTF8 as default CHARSET, as
well as the clients, and AL16UTF16 for NATIONAL CHARSET.
Problem:
After some weeks analysing and testing both Oracle and Borland sides, I
still have problems to display correctly asian characters on DBGrid's in
a test application.
Tests:
-Set Local NLSLANG=UTF8
-Query:
select '<chinese_chars1>',
substr(dump('<chinese_chars1>',1016),1,70)
from dual
-Result: Characters not showed correctly in Field1, but correctly in the
title.
Displayed in Field1:
<uknown_chars1>= raw:e697a5e69cace8aa;
UCS-2:003F4EA4EBF196A4;
UTF8:3FE4BAA4EEAFB1E99AA4
Displayed in Field2:
CharacterSet=UTF8: e6,97,a5,e6,9c,ac,e8,aa,9e
If I still make a query on a test table, where it exists a VARCHAR2
column and another NVARCHAR2 column, I do not get any result from the
NVARCHAR2 one, and still the VARCHAR2 column displays something similar
as above.
Questions:
1) Does VCL support Unicode characters? When I copy and paste chinese
characters from IE into a VCL test application, my Edit fields show it
correctly. But to get them from notepad I have to manipulate the
Clipboard to get WideString text, otherwise VCL shows something like '???'.
2) What should I do to be unicode compliant using VCL, BDE and Oracle?
Thanks,
Marcelo Leister.
 

{smallsort}

Re:BDE, VCL, Unicode and Oracle

Yahia El-Qasem wrote:
Quote
we use DOA 4 ( www.allroundautomations.com ) + BCB6E + Tnt Components (
tnt.ccci.org/delphi_unicode_controls/ ) + Oracle 9 / 10.

this combination works absolutely fine with UTF8 as default CHARSET in the
Oracle DBs.
you need to be aware that you need to call UTF8Decode on UTF8-based strings
to get the correct WideString...

HTH

Yahia

Dear Yahia,
I appreciate your sugestion and will take under consideration for a
secondary solution. I say "secondary" because I would still like to
insist on using BDE and default VCL components. I would give up on that,
if either my choosen constelation does not support what I want, or if I
find another solution that brings less effort and costs to my project.
What is your opinion? Am I going into the wrong way?
Another important point is that we have a local Paradox database (subset
from Oracle) for the case Oracle is unavailable. The current model uses
the same components to access both database. But if we have to choose
another solution, I wouldn't mind on re-modeling this case.
My main question is still: may I use BDE and VCL to support unicode
database? And if positive, how is the way to do that? I would also to
have the flexibility in the future to move to another database as MaxDB.
Many thanks,
Marcelo Leister.
 

Re:BDE, VCL, Unicode and Oracle

Hello Leister,
I'm not a experienced user of ODBC ( I'm using ODAC - www.crlab.com ),
but checking the BDE alias parameters I found the "LANGDRIVER", maybe
you should set it up to make the system work.
HTH
Jayme.
"M.Leister" < XXXX@XXXXX.COM >escreveu na mensagem
Quote
Yahia El-Qasem wrote:

>we use DOA 4 ( www.allroundautomations.com ) + BCB6E + Tnt Components (
>tnt.ccci.org/delphi_unicode_controls/ ) + Oracle 9 / 10.
>
>this combination works absolutely fine with UTF8 as default CHARSET in
the
>Oracle DBs.
>you need to be aware that you need to call UTF8Decode on UTF8-based
strings
>to get the correct WideString...
>
>HTH
>
>Yahia
>

Dear Yahia,

I appreciate your sugestion and will take under consideration for a
secondary solution. I say "secondary" because I would still like to
insist on using BDE and default VCL components. I would give up on that,
if either my choosen constelation does not support what I want, or if I
find another solution that brings less effort and costs to my project.
What is your opinion? Am I going into the wrong way?

Another important point is that we have a local Paradox database (subset
from Oracle) for the case Oracle is unavailable. The current model uses
the same components to access both database. But if we have to choose
another solution, I wouldn't mind on re-modeling this case.

My main question is still: may I use BDE and VCL to support unicode
database? And if positive, how is the way to do that? I would also to
have the flexibility in the future to move to another database as MaxDB.

Many thanks,
Marcelo Leister.

 

Re:BDE, VCL, Unicode and Oracle

Dear Marcelo,
from my experience I banned any BDE based DB work because of several
problems ( nothing specific to unicode though ).
I suggest to not use anything BDE based esp. since Borland dropped support
for it.
VCL itself is not unicode capable... TNT controls make most standard VCL
controls ( incl. DB ones ) available as unicode capable version.
for your scenario to work with a local database in cases where Oracle DB is
not available :
it depends on the complexity of your DB - it could even be possible to us
some memory-table ( like kbmMemTable or SQLMemTable ). they offer the
ability to store their content into a local file and load it from there...
just my 2 cents :-)
Yahia
"M.Leister" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
Yahia El-Qasem wrote:

>we use DOA 4 ( www.allroundautomations.com ) + BCB6E + Tnt Components (
>tnt.ccci.org/delphi_unicode_controls/ ) + Oracle 9 / 10.
>
>this combination works absolutely fine with UTF8 as default CHARSET in
the
>Oracle DBs.
>you need to be aware that you need to call UTF8Decode on UTF8-based
strings
>to get the correct WideString...
>
>HTH
>
>Yahia
>

Dear Yahia,

I appreciate your sugestion and will take under consideration for a
secondary solution. I say "secondary" because I would still like to
insist on using BDE and default VCL components. I would give up on that,
if either my choosen constelation does not support what I want, or if I
find another solution that brings less effort and costs to my project.
What is your opinion? Am I going into the wrong way?

Another important point is that we have a local Paradox database (subset
from Oracle) for the case Oracle is unavailable. The current model uses
the same components to access both database. But if we have to choose
another solution, I wouldn't mind on re-modeling this case.

My main question is still: may I use BDE and VCL to support unicode
database? And if positive, how is the way to do that? I would also to
have the flexibility in the future to move to another database as MaxDB.

Many thanks,
Marcelo Leister.