Environment
Windows XP Professional Russian SP2
precompiled GPG
Description
Non-ascii directory/file names are shown incorrectly in messages like "gpg: keyring created '%filename' or national equivalent:
gpg: создана таблица ключей `C:/Documents and Settings/╦х°р/Application Data/gnupg\secring.gpg'
/╦х°р/ is in wrong encoding
How To Repeat
install fresh GPG on windows machine with username (home folder) written in non-ASCII.
Fix
WinXP uses different codepages to represent Unicode in console output and in file names:
OEMCP for console (e.g. DOS866 in Russia)
ANSICP for filenames (e.g. Win1251 in Russia)
To represent national file/dir names in console output correctly, something like
printf('File: %s',AnsiToOem(singlebyte_filename)) must be always used.