Hello Heiko, I think this patch is important, however as I wrote before it is very difficult to review when you send it as one chunk.
It is much better if you split this into trivial changes (the fopen->openvpn_fopen and such) and then focus on each complex change as in the openssl functions. The trivial code can be easily merged even without the complete functionality, slowly making the openvpn Unicode complaint. The configuration file format is also an issue, if I understand correctly you force configuration to be UTF-8, while in windows it is none standard as UCS-2 should used. Alon. On Fri, Feb 10, 2012 at 4:13 PM, Heiko Hund <heiko.h...@sophos.com> wrote: > > Openvpn for Windows is not compiled as a Unicode binary and thus cannot > handle paths which contain non-ASCII characters using the argv vector. > Characters that are not present in the system codepage are simply replaced > with a question mark, e.g. if started as 'openvpn --config домой.ovpn' > the file '?????.ovpn' is tried to be opened as configuration. > > The same applies to paths in config files which need to be UTF-8 > encoded if they contain non ASCII characters. The option line > 'key лев.pem' will lead to openvpn trying to open 'лев.pem' on a > system with codepage 1252. > > This patch makes openvpn read the command line in UCS-2 and convert > it to UTF-8 internally. Windows stores names in the filesystem in UCS-2. > When using a paths openvpn converts it from UTF-8 to UCS-2 and uses the > wide character Windows API function. > > Signed-off-by: Heiko Hund <heiko.h...@sophos.com> > --- >