I created an executable with the name ´╗┐UTF-8.exe (the first three characters are the UTF-8 byte order mark as notepad adds to the start of an UTF-8 file, see http://groups.google.com/group/xxcopy/browse_thread/thread/9a0a14c411b78ba1 for an explanation)
This file is not compressed, but a FileNotFoundException is generated.
The output of UPX is as follows:
>upx --best *.exe
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2011
UPX 3.08w Markus Oberhumer, Laszlo Molnar & John Reiser Dec 12th 2011
File size Ratio Format Name
-------------------- ------ ----------- -----------
[some lines deleted]
upx: wx-config.exe: AlreadyPackedException: already packed by UPX
upx: ┤++UTF-8.exe: FileNotFoundException: ┤++UTF-8.exe
-------------------- ------ ----------- -----------
0 -> 0 0.00% [ 0 files ]
Arghhh. If windows can not open a file with this name using its own file API, then I think this is a windows problem.
Windows internally does use a 16-bit wchar_t, and we should call functions like _wfopen() instead of fopen().
But I really don't feel rewriting large parts of UPX, so unless we find a UTF-8 emulation library for mingw this is a wont-fix.