Hi again,

Ok, maybe I don't understand correctly the internal operation of 
xHarbour. To be more specific I will describe the actuall requirement 
that I'm trying to solve.

One of our customers need to have _concurrently_ displayed on the screen 
and printed on the printer English, Polish, Russian and Ukrainian 
languages. Oracle database used via Mediator need to be stored in 
UNICODE for convenient operation of other multi-language SQL 
applications. Sometimes even a single field contains charaters from 
different languages.


So, we plan to do the following:

1. Implement 'Character' fields in Oracle as UNICODE
2. Deliver UNICODE strings via Mediator to MEDNTX or MEDCDX RDD linked 
info xHarbour application.
3. When application references 'Character' field either by using its 
name or calling FieldGet() function the 'GetValue' RDD method is called 
to obtain the field value. 'GetValue' RDD method returns the string to 
xHarbour as HB_ITEM. AFAIK, there is no possibility to return UCS2 or 
UTF8/UTF16 UNICODE strings as HB_ITEM. At least no in a way meaningfull 
for the xHarbour Virtual Machine (VM).
That means that _before_ returning string from RDD to application we 
need to convert it to 8-bit/char string using the current host codepage 
selected by application. At this conversion the loose the UNICODE string 
information and only one language is correctly represented in the string 
returned to application.
For instance, if the original UNICODE string delivered from Oracle 
contains all the languages mentioned above and the host codepage 
(HB_SETCODEPAGE) is set to "PLWIN", the converted 8-bit string will 
correctly represent Polish and English characters but not Russian and 
Ukrainian ones. Of course that means the application cannot correctly 
display it on the screen, print or even use in comparisons or other 
character expressions.

I can be wrong, but it seems that the right xHarbour UNICODE 
implementation would require implementation of the new HB_ITEM type 
'UNICODE STRING' and extending the expression evaluator and VM to 
support such item type. Also GTs would need to be adapted to understand 
UNICODE strings.

Best regards,
Jacek



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to