MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #22484 All Revisions ] Back to Issue ]
Summary 0022484: UNICODE characters support.
Revision 2014-09-24 12:28 by abv
Additional information
and documentation updates
UNICODE characters support in OCCT

The main idea of the implemented improvement is that API is kept untouched. Instead behavior of all functions that accept on input Standard_CString is changed, so that now the strings are assumed to be in UTF-8 encoding.

The constructor of TCollection_ExtendedString is used to convert UTF-8 strings to wide characters, which are then cast directly to wchar_t* and passed to appropriate system functions that take wchar_t* on input; for example, _wopen instead of open.

Note that this change will break backward compatibility with applications which currently use filenames in extended ASCII encoding bound to the current locale. Such applications should be updated to convert such strings to UTF-8 format.

The patch has been implemented for WNT platform only; other platforms remain supporting only ASCII encoding.

The conversion from UTF-8 to wchar_t is made using little-endian approach. Thus, this code will not work correctly on big-endian platforms. It is needed to complete this in the way similar as it is done for binary persistence (see the macro DO_INVERSE in FSD_FileHeader.hxx).
Revision 2011-05-10 12:40 by epv
Additional information
and documentation updates


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker