On Wed, Jun 22, 2016 at 12:12:13PM +0200, Jean-Pierre André wrote: > > FYI Following a recent patch, translations of wide chars > to utf-8 should never fail any more, even when they are > invalid Unicode ones.
Yes, I probably would not have found this bug after that patch. I have been planning to update wimlib to allow unpaired surrogates as well. I was also considering whether it is possible to define a bijection between invalid "UTF-8" and invalid "UTF-16" names, which would allow all "multibyte" filenames to be translated to "wide character" filenames and vice versa, rather than just in one direction (wide to multibyte). But this didn't seem possible in any straightforward way. By the way, there is technically no requirement that the two software packages translate strings in the same way. wimlib only calls libntfs-3g functions which take inode numbers or wide character strings --- except for ntfs_set_ntfs_dos_name(), which is only expected to work with certain characters anyway. Indeed, after fixing the ntfs_delete() bug but regardless of whether the "allow broken Unicode" patch is included, libntfs-3g correctly handles filenames that are not valid UTF-16LE, at least as far as the functionality exercised by wimlib. Eric ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ ntfs-3g-devel mailing list ntfs-3g-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel