<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 14px;" lang="x-unicode">
<br>
On 1.4.2013 15:29, LRN wrote:
<br>
<blockquote type="cite" style="color: #000000;">That's a valid
point.
<br>
<br>
Alternative approach (something i saw in libxml2 recently) is to
make
<br>
UTF-8-to-UTF-16 conversion a bit smarter:
<br>
First try the conversion, assuming the string to be
UTF-8-encoded.
<br>
If that fails, assume the string is in native encoding, and run
the
<br>
conversion function again with appropriate source codepage (when
using
<br>
W32 conversion functions that would be CP_ACP).
<br>
If that fails, fail the function call as usual.
<br>
<br>
</blockquote>
<br>
I initially had it that way. I just didn't feel comfortable
leaving it as it could in theory access wrong files. Granted, it
would require having some rather weird names for files but it's
still a possibility.
<br>
<br>
(Sorry LRN for initially sending the mail directly in your box. I
need to learn to press the right buttons.)<br>
<br>
</div>
</body>
</html>