I am using C++ OCI LIB, to insert some report data from remote OCI client [10.2.0] to oracle 11 server. This data is read by another process to create the report.

The DB CHARSET is UTF-8. But the report tool expects the data to be ISO08859-1 encoded. So while inserting the data into the database i specify the following LANG and CHARSET for my table colulmn in client:

The TARGET DB CHARSET is UTF-8

NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1

size_t csid = 871; // UTF-8

OCIAttrSet((void *) bnd1p, (ub4) OCI_HTYPE_BIND,
*(void )&csid,
(ub4) 0,
(ub4)OCI_ATTR_CHARSET_ID, errhp);

This solution works for almost every case of ASCII and Extended ASCII Charest but we are facing issues if we have few specific characters to be inserted.

If we are trying to insert single beta character [β] through client, the data goes empty to the column.

Beta Character details:
DEC OCT HEX BIN Symbol Description
223 337 DF 11011111 Latin small letter sharp s

DB Output after insert single β:
select rawtohex(NAME) from PERSONS where EID=333;
RAWTOHEX(NAME)
---------------------------

But if the string is "ββ" everything work fine:
DB Output for "ββ":
select rawtohex(NAME) from PERSONS where EID=333;
RAWTOHEX(NAME)
---------------------------
DFDF

Please help me out in understanding where I am going wrong and how to resolve this