Characters with accents displayed wrong



i currently have a problem with Strings containing characters with special accents above them like ‘ê’ and so on. they are displayed as combination of exotic other characters. on Windows, compiled with Visual C++, that is. on mac with xcode, it seems to work so i was thinking that it has to do with project settings (use character set) - i tried all available options (not set, unicode, mbcs) - none works. i also tried different fonts - no avail. any ideas what is causing this and how to fix it?

thanks, robin


It sounds like a problem with the encoding of your c++ files, which can be a PITA when you move files between different platforms and editors.

I try to avoid the problem by not having any non-ascii chars in the text itself - you could escape them inside unicode strings, e.g. L"abcd\01234"


hey thanks a bunch jules!

switching the encoding setting for the file in the ‘Advanced Save Option’ from the File menu from ‘Unicode (UTF-8 with signature)’ to ‘Western European (ISO)’ solved it. is there anything else i should be aware of - i.e. negative side effects of switching that setting?


That’s great if it works, but I’ve found that sometimes when you open a file in a different editor or different machine, it’ll mess it up without you noticing that it’s changed…