itss: fix handling non-ASCII content paths (v3)

Rafał Mużyło galtgendo at o2.pl
Tue Sep 12 10:49:04 CDT 2017


Warning: Attached code is horrible and likely non quite correct...

Yet it makes things work.

Current itss code in wine is a case of turning working code into non-working
one. Namely, code taken from chm_lib during "conversion" to add WCHAR
paths was done a bit blindly. This patch does pretty much the same thing
trying to make things work again.

Tested with a chm file that contains a content file with non-ASCII name.
The stored paths were UTF-8 - I don't know the format, so I just hope
there's no encoding field somewhere, that I've missed; yet, if there is,
wine isn't handling it either.

v2: as it seems even non-BMP Unicode chars after conversion from utf-8
should fit into buffer of same size (in bytes), droped allocations.
v3: got convinced return value of MultiByteToWideChar turned bool is the
correct thing to do.

...(   )...

Signed-off-by: Rafał Mużyło <galtgendo at o2.pl>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: chm_utf8_path.patch
Type: text/x-diff
Size: 836 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20170912/357ac931/attachment.patch>


More information about the wine-patches mailing list