Background - I want to support Japanese and English in my program and I don't want to have to use Japanese-only character encoding with any files (source files or external text files). I also would like it if the program could run on computers without Japanese language support installed (obviously not displaying Japanese for those users ;-).
Visual Studios allows you to set the character set used by the compiler (I guess similar options exist in other development suites?). The options are "Not Set" "Multi-byte Character Set" and "Unicode Character Set".
For example:
Code:
GetModuleFileName(hInstance, path, sizeof(path))
If the environment is "Unicode" then 'path' needs to be declared with wchar_t. If you use char then you get '\0' every other character in the string returned. If the environment is multi-byte then it seems to work just fine with char (but my computer has the Japanese charset Shift-JIS as the default).
The character encoding used on the source files themselves does not seem to have any bearing on how this Environment setting works (Unicode(UTF-8) source files work just fine with "Multi-byte").
Does this 'environment' setting only affect Windows API related functions?
Bearing in mind that I want to be able to compile the program in Linux with at least one compiler, which would I be better off using - multi-byte or Unicode ?