I have a large amount of existing C++ code that uses plain fopen() in various places to open files. Generally, the path used is an absolute path, and starts either with "C:\Program Files (x86)\MyProgram..." or with "C:\Users\Public\MyProgramData...".
The program and data are installed to these locations by a standard installer (InnoSetup).
("C:\Program Files (x86)" and "C:\Users\Public" are not hard-coded in the code. But those are the suggested program and data install locations, so most often those will be the paths where files are opened, as created by the installer presumably in whatever local name those folders should have on the user's machine.)
I'm concerned about the possibility that on a non-English version of Windows, these path prefixes may contain non-ascii characters, which will make fopen() unhappy.
For "Program Files", the following references make it seem like my only potential worry among the most common languages is Hungarian ("Programfájlok"):
- http://en.wikipedia.org/wiki/Program_Files
- http://www.samlogic.net/articles/program-files-folder-different-languages.htm
For "Users\Public" I was not able to find a reference giving translations for common languages like that, but in Spanish, for instance, I imagine it must be Pública?
Do you know what pitfalls I'm likely to encounter around the world using plain fopen() like this on these two paths?