ntfs-3g/libntfs-3g
Erik Larsson d9c61dd60e unistr.c: Enable encoding broken UTF-16 into broken UTF-8, A.K.A. WTF-8.
Windows filenames may contain invalid UTF-16 sequences (specifically
broken surrogate pairs), which cannot be converted to UTF-8 if we do
strict conversion.

This patch enables encoding broken UTF-16 into similarly broken UTF-8 by
encoding any surrogate character that don't have a match into a separate
3-byte UTF-8 sequence.

This is "sort of" valid UTF-8, but not valid Unicode since the code
points used for surrogate pair encoding are not supposed to occur in a
valid Unicode string... but on the other hand the source UTF-16 data is
also broken, so we aren't really making things any worse.

This format is sometimes referred to as WTF-8 (Wobbly Translation
Format, 8-bit encoding) and is a common solution to represent broken
UTF-16 as UTF-8.

It is a lossless round-trip conversion, i.e converting from broken
UTF-16 to "WTF-8" and back to UTF-16 yields the same broken UTF-16
sequence. Because of this property it enables accessing these files
by filename through ntfs-3g and the ntfsprogs (e.g. ls -la works as
expected).

To disable this behaviour you can pass the preprocessor/compiler flag
'-DALLOW_BROKEN_SURROGATES=0' when building ntfs-3g.
2016-04-08 05:39:48 +02:00
..
Makefile.am Implemented fstrim(8) 2014-07-31 14:03:11 +02:00
acls.c Removed declarations for using acls.c outside ntfs-3g 2016-04-07 09:32:26 +02:00
attrib.c Fix compiler warnings about mismatching printf format / argument type. 2016-02-16 09:30:49 +01:00
attrlist.c Fix incorrect usage of native/little-endian types, signed types, etc. 2015-12-21 23:55:31 +01:00
bitmap.c Adapted to ntfs-3g.1.2712 2008-07-13 17:55:57 +00:00
bootsect.c Fix code to use const_cpu_to_X/const_X_to_cpu macros for constants. 2015-12-21 23:21:00 +01:00
cache.c Removed unneeded variables as warned by gcc 4.6 2011-07-05 12:17:29 +02:00
collate.c Made direct calls to collation functions 2009-12-16 10:20:57 +00:00
compat.c Adapted to ntfs-3g.1.2812 2008-08-16 15:17:47 +00:00
compress.c Merge endianness fixes. 2016-01-28 09:22:42 +01:00
debug.c Adapted to ntfs-3g.2009.3.8 2009-03-27 09:10:00 +00:00
device.c Fixed a use of uninitialized variable compiler warning 2013-02-13 08:54:34 +01:00
dir.c Made a full check for whether a user extended attribute is allowed 2016-04-06 10:17:27 +02:00
ea.c Implemented an extended attribute to get/set EAs 2014-04-12 09:22:17 +02:00
efs.c efs.c: Fix incorrect type of local variables 'newsize' and 'oldsize'. 2016-02-08 18:42:53 +01:00
index.c Merge endianness fixes. 2016-01-28 09:22:42 +01:00
inode.c Fix incorrect usage of native/little-endian types, signed types, etc. 2015-12-21 23:55:31 +01:00
ioctl.c Fixed returning the trimming count to fstrim(8) 2015-12-01 11:00:24 +01:00
lcnalloc.c Fix endianness issues in log and terminal output. 2015-12-21 23:31:09 +01:00
libntfs-3g.pc.in Updating the source directory tree 2008-03-28 14:42:50 +00:00
libntfs-3g.script.so.in Updating the source directory tree 2008-03-28 14:42:50 +00:00
logfile.c Added a usn field to RESTART_PAGE_HEADER 2016-04-06 10:58:25 +02:00
logging.c Enabled renaming of system extended attributes 2010-10-26 08:59:52 +02:00
mft.c Silenced fixup warnings when allocating a new MFT record 2016-04-06 09:32:18 +02:00
misc.c Redesigned caches for indexing cached entries 2009-12-17 17:36:06 +00:00
mst.c mst.c: Fix mixed native/little-endian usage of variable 'usn'. 2016-01-25 11:30:13 +01:00
object_id.c Used ENOENT instead of ENODATA when the latter is not defined (Robert Millan) 2012-01-23 16:50:25 +01:00
realpath.c Fixed device path canonicalization for use by devmapper (basilinya) 2011-07-05 12:17:12 +02:00
reparse.c Used plugins to process reparse points 2016-04-06 09:10:35 +02:00
runlist.c Fixed special case of decompressing a runlist 2015-11-20 16:17:48 +01:00
security.c Fixed the range of valid subauthority counts in a SID 2015-07-14 08:37:01 +02:00
unistr.c unistr.c: Enable encoding broken UTF-16 into broken UTF-8, A.K.A. WTF-8. 2016-04-08 05:39:48 +02:00
unix_io.c ntfs_fsync: fix comment (Erik Larsson) 2009-11-05 11:30:47 +00:00
volume.c Enabled fallback to read-only mount when volume is hibernated 2016-04-06 09:51:47 +02:00
win32_io.c Returned an error code for an exclusive access violation on Windows 2016-04-06 10:08:01 +02:00
xattrs.c Implemented an extended attribute to get/set EAs 2014-04-12 09:22:17 +02:00