Print Page | Close Window

UNICODE data in non-UNICODE app...

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=15765
Printed Date: 29 September 2024 at 1:29pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: UNICODE data in non-UNICODE app...
Posted By: ddlittle
Subject: UNICODE data in non-UNICODE app...
Date Posted: 02 December 2009 at 2:40pm
I have some UTF-16 data that I want to display in my CXTPReportControl, but CXTPReportRecordItemText()'s constructor only uses LPCTSTR, which is a char* without _UNICODE defined.  It's impossible to redo the whole app as UNICODE.  Is there any solution?  For now, I'm converting the code to UTF-8, but I'm hoping that's temporary.  Code that follows converts to UTF-8:

USES_CONVERSION;

vector<wstring>::iterator lineNumber;

for(lineNumber = m_LineNumberNameList.begin();lineNumber != m_LineNumberNameList.end();lineNumber++)

{

wstring name = *(lineNumber);

CXTPReportRecord* rec = new CXTPReportRecord;

InsertDefaultColumns(rec);

rec->AddItem(new CXTPReportRecordItemText(W2A(name.c_str())));

m_OrgReport.AddRecord(rec);

}




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net