[Poppler-bugs] [Bug 35378] Poppler::Document::load() function fails on some MS-Windows configurations

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 18 05:57:07 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35378

--- Comment #11 from yoch <yoch.melka at gmail.com> 2011-04-18 05:57:07 PDT ---
Okay, this is not a bug in Qt.

I quote the reply to my report :

"imo this is invalid use case. QFile::encodeName is documented to encode the
file name in a local 8 bit encoding, which will is not unicode, hence it will
not be able to handle certain characters.

For example, if you Windows is configured in Russian, then the local 8bit
encoding is cp1251, so QFile::encodeName tries to convert a string from UTF-16
(that's how QString stores the data) to cp1251 - russian characters will be
converted properly and you will be able to use the resulted string with
fopen(), however e.g. Hebrew characters will not be handled correctly because
they cannot be represented in cp1251.

Try using QFile api to access the file content - that should better as it
doesn't convert the file name to the local 8 bit encoding. Alternatively, use
Win32 api directly to access the file (i.e. CreateFile, etc)"

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list