Is the Lotus C++ API 3.0 unicode compliant?

Hi there,

Recently i have developed an user interface using the Lotus C++ API to retrieving data from the Notes Database.

In my program, i frequently uses commands like the ones stated below to pass values to/from the lotus to my user application

LNString lnstrbuffer1;

CString CStrBuffer1;

CStrBuffer1 = lnstrBuffer1;//for passing values from Notes to my application

LNString lnstrbuffer2;

CString CStrBuffer2;

lnstrBuffer1 = CStrBuffer2;//for passing values from my application to Notes

My program works perfectly well when it is compiled on the ANSI platform (some people call it the MBCS). However, when i try to change the codes into unicode i get errors like this

error C2679: binary ‘=’ : no operator defined which takes a right-hand operand of type ‘class CString’ (or there is no acceptable conversion)

which probably means that the LNString is in the ANSI form and cannot be converted into Unicode.

Is there any other alternative codes or work around i can use to solve this problem?

Or is there any setting in the lotus API that can be set to change the codes to Unicode?

or does the Lotus API 3.0 support Unicode in the first place?

Thanks to anyone that can help or offer any advice or information in advance. :slight_smile:

cheers

Subject: Is the Lotus C++ API 3.0 unicode compliant?

for sure notes supports unicode. you can use c-api OSTranslate to translate UNICODE to NATIVE / LMBCS / UTF8…

c-api can be used right within c++ code.

i’m not aware if c++ api 3.0 supports unicode directly, 2.1 didn’t (just lmbcs & native where needed).

almost all notes-functions like to see LMBCS. so if you have to go UNICODE way, just use OSTranslate OS_TRANSLATE_UNICODE_TO_LMBCS before feeding notes-functions.

what happens if you change project-settings to UNICODE: i think CString will then contain WCHARS and there’s no way to cast them to char anymore. if you have problems using CStrings without setting UNICODE you maybe are just missing a (const char*) cast?

i’d prefer std::string instead of CString :slight_smile:

Markus Seitz

markus.seitz@icodex.com