tpaviot/oce — Issue #214: Multibyte support likely to be broken on non-Windows in 0.9.0-dev
Author: dbarbier
Created: 2011-12-13 11:03:15+00:00
State: open

Hello,

OCCT 6.5.2 announcement contains this item:
- Support of two-byte character strings in visualization

To do that, function prototypes have been converted from `char*` to `wchar_t*`. A potential problem is that `wchar_t` is 4 bytes large on Linux (and I guess Mac OS X) whereas it seems to be 2-byte large on Windows, according to the sentence above. This may cause subtle bugs if `wchar_t` is taken as a synonym for `short`. For instance, gcc prints this warning:

```
src/OpenGl/OpenGl_subrs.cxx:1635:34: warning: format ‘%S’ expects argument of type ‘wchar_t*’, but argument 2 has type ‘Techar* {aka short unsigned int*}’ [-Wformat]
```

but there may be more serious problems.