I'm working in a software that need to save a utf-8 file with special characters (like 'çäüëé').
I received the content to save (regular string with special characters encoded) from a webservice (with gsoap). When I try to save, using ofstream, the file saves a square and other strange characters instead of special characters.
When I try to convert the regular string to a wide string, it's lost the special characters (it is replaced by different ones). And, using wofstream, the file not saves the file when there are special characters.
I try to use also utf8-cpp, but the file it wasn't wrote correct too.