Failed to open slide file name contains non-ascii character

zhaoy at zhaoy at
Tue Sep 8 23:56:20 EDT 2015

Hi Benjamin,

Your code works great! Any file name works now.

Thanks a lot!


> On Sep 9, 2015, at 7:15 AM, Benjamin Gilbert <bgilbert at> wrote:
> Hi Ray,
> On 09/06/2015 10:59 PM, zhaoy at wrote:
>> The mail list can’t be searched.
> There's a search box at the top of the OpenSlide website.
>> Recently we trying to use OpenSlide on Windows with the prebuilt
>> binaries. It works well except failed to open a file name contains some
>> non-ascii characters like Japanese of Chinese. I tried pass filename
>> parameter with OEM/UTF8 encoding, but non of it works.
> OpenSlide was opening files with fopen(), which on Windows expects the
> filename to be in the ANSI code page.  That won't work, of course, with
> arbitrary filenames.  I've modified OpenSlide to interpret filenames as
> UTF-8 on Windows and use _wfopen():
> Try the 2015-09-08 build:
> It turns out that the OpenSlide command-line tools were reading the ANSI
> command line instead of the Unicode command line, which was causing a
> similar problem in the tools.  They're still broken in the 2015-09-08
> build, but should be fixed in tomorrow's build.
> Thanks for the report!
> --Benjamin Gilbert
> _______________________________________________
> openslide-users mailing list
> openslide-users at

只有有权接收电子邮件中可能包含的机密信息的用户才能接收此电子邮件。从 传递的电子邮件可能包含机密信息和法律特许的信息。如果您不是此邮件的预期收件人,请勿阅读、复制、转发或存储此邮件。如果已误收此邮件,请将其转发到发件人,并从您的计算机系统彻底删除此邮件。
Important Notice:
This message from's email system is for the designated recipient only and may contain privileged, propritary, or otherwise private information. If you received it error, please notify the sender immediately and delete the original. Any other use of this email by you is prohibited.

More information about the openslide-users mailing list