[Interest] Unicode code points in Vusual Studio. Output differs from MinGW
Thiago Macieira
thiago.macieira at intel.com
Thu Aug 11 18:29:06 CEST 2016
On quinta-feira, 11 de agosto de 2016 11:40:46 PDT Mark Gaiser wrote:
> Is there any way that i can use a string with unicode code points within
> tr(...) that works on MSVC 2010 (as that is my setup), but it would be
> great if it also works under MSVC 2015 and MinGW.
There's no way to make that work with MSVC 2010. If you want this to work,
your options are:
a) upgrade to MSVC 2015 Update 3 and add the "-utf-8" option to
QMAKE_CXXFLAGS.
b) upgrade to MSVC 2015 any version and write:
tr(u8"Co\u00F6rdinaat")
note: it's very likely that lupdate does *not* understand this! if that's
the case, file a bug report and "hide" the u8 with a macro
#define tr(x) tr(u8 ## x)
Or, your fallback option: stop using unicode literals.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list