PDA

View Full Version : oo4o c++ interfaces with unicode


snailmmx
05-12-2005, 06:30 PM
Hi all,

The website (www.oracle.com/technology/
tech/windows/ole/htdocs/OO4O_10g_FO.htm ) said that oo4o can support Unicode
now. But in the oracl.h header file, all the strings are still char* type.
Now if I want to write some unicode version applications with c++, will it
be possible to call the functions provided by oo4o without converting the
strings manually?

Thanks.

Malcolm Dew-Jones
05-12-2005, 11:50 PM
snailmmx (snailmmx@163.com) wrote:
: Hi all,

: The website (www.oracle.com/technology/
: tech/windows/ole/htdocs/OO4O_10g_FO.htm ) said that oo4o can support Unicode
: now. But in the oracl.h header file, all the strings are still char* type.
: Now if I want to write some unicode version applications with c++, will it
: be possible to call the functions provided by oo4o without converting the
: strings manually?

I don't know oo4o, but in general char* is fine for utf-8 (that's the
whole point of utf-8).

The issue would be whether the string handling functions support utf-8,
and much of the time that doesn't even matter. Many non-utf-8 functions,
e.g. strcmp and strstr, work just fine on utf-8 data, and again, that's
the whole point of utf-8.


char* _could_ be fine for utf-16 also, if the compiler uses 16 bit
characters (like java does). Do any real-world C compilers do this yet?


--

This space not for rent.

Sybrand Bakker
05-15-2005, 03:40 AM
On Fri, 13 May 2005 10:30:39 +0800, "snailmmx" <snailmmx@163.com>
wrote:
Hi all,The website (www.oracle.com/technology/tech/windows/ole/htdocs/OO4O_10g_FO.htm ) said that oo4o can support Unicodenow. But in the oracl.h header file, all the strings are still char* type.Now if I want to write some unicode version applications with c++, will itbe possible to call the functions provided by oo4o without converting thestrings manually?Thanks.

utf-8 character strings will just take up more space. This is not an
issue of datatype but of memory management.


--
Sybrand Bakker, Senior Oracle DBA


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service