#562 closed defect (fixed)
Problem with wchar in Linux
Reported by: | rafael | Owned by: | haris |
---|---|---|---|
Priority: | blocker | Milestone: | 3.5.0 |
Component: | KingOracle Provider | Version: | 3.4.0 |
Severity: | 2 | Keywords: | |
Cc: | External ID: |
Description
Unlike Windows UTF-16 2-byte wide chars, wchar_t on Linux and OS X is 4 bytes UTF-32 (gcc/g++ and XCode).
Code like this don’t work in Linux:
Oracle manual: “To prepare the SQL statement, call OCIStmtPrepare with (utext*) string. The following example runs on Windows platforms only. You may need to change wchar_t datatypes for other platforms.
const wchar_t sqlstr[] = L"SELECT * FROM ENAME=:ename"; ... OCIStmt* stmthp; sts = OCIHandleAlloc(envh, (void **)&stmthp, OCI_HTYPE_STMT, 0, NULL); status = OCIStmtPrepare(stmthp, errhp,(const text*)sqlstr, wcslen(sqlstr), OCI_NTV_SYNTAX, OCI_DEFAULT);
Change History (3)
comment:1 by , 15 years ago
Priority: | major → blocker |
---|
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 7812: