-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01.04.2013 16:24, Janne Hyvärinen wrote: > I'm worried about some of the modifications done to the UTF-8 > patch. In commit 2199d086921eb37d249cae0731f334556ec6209d #ifdef > checks were changed from specific FLAC__STRINGS_IN_UTF8 to generic > _WIN32 and the specific defines were later removed in commit > 0cd2e9ed6918b782195d0024dd19dcfa39df8f82. > > The reason I had them this way is that FLAC API has public > functions that work with filenames. Default compile options for > FLAC would be unaffected and existing programs that rely on ANSI > filenames would continue to work. The new configuration option > "Release (UTF-8)" was meant to isolate the changes so that only > official bundled frontends that know about the changes would use > them. That's a valid point.
Alternative approach (something i saw in libxml2 recently) is to make UTF-8-to-UTF-16 conversion a bit smarter: First try the conversion, assuming the string to be UTF-8-encoded. If that fails, assume the string is in native encoding, and run the conversion function again with appropriate source codepage (when using W32 conversion functions that would be CP_ACP). If that fails, fail the function call as usual. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRWX2+AAoJEOs4Jb6SI2Cw914IAMkkQr7ZmiZ/Ei9nhXEtKATe oASC/VEv/1MqJK2u1VF0hDIMjVjqHbqX2I+twEMQR5UXmH1oJXmhbZjS5s9J2Iqq l8F9MRp9AhCpHo0+zqWQ3He0YmdYnSWLO3L6LLph9oGexDIBke8y2K4n7Vi+tNgP nVpe6+O/gXws/JLpPpfUSvHv9Nzl/yDPBlBc2FVsTYs0dWGInP1RD1ugitohGgcH VHzwit3+BmZW7NZer4fBhzIaOoqmDhLrwj3QFLfnosaj0H73U+Hiav5rF6vhKPq5 RNpsvbJsAZXanmpDteZmgXjA5ll7oEfe+IDLubm+0c+XXAYgtVz5njiLKcYd4+Y= =/Ad4 -----END PGP SIGNATURE----- _______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev