I ported an application from Windows to Linux and I encountered a problem with character encoding: I saw that accented letters (e.g. 'é' 'à') are considered as wchar_t
(4 bytes with g++) whereas under Visual Studio, they take 1 byte (char). My unit tests failed because in my code I have character comparisons using accented letters (as in Linux they are multibyte).
Is it possible to cast accented letters (like 'û') to the Windows encoding (1 byte) in Linux or should I refactor my code and use std::wstring
instead?