Support Surrogate Pairs to handle UTF16 Supplementary Plane in NTFS Filenames on USB Shared Disks
Two scenarios fail when using an NTFS formatted disk attached to a Deco BE-85:
1. Creating a filename or folder with a character in the UTF16 Supplementary Plane fails (you are prevents from doing so). This includes files with rare chinese characters such as '𦻙' and emoji such as '💝'.
2. Renaming these files on a disk which already has these characters in filenames (they are valid Windows NTFS filenames and handled correctly by Windows) via USB Disk Sharing on the BE-85 results in the files becoming corrupt and needing a repair with the disk directly attached to a Windows workstation, see the checkdsk output below for details for the file '01. 第一章 アシタカ𦻙記.xml'.
Checking file system on G:
Volume label is Storage.
Stage 1: Examining basic file system structure ...
5376 file records processed.
File verification completed.
Phase duration (File record verification): 222.95 milliseconds.
0 large file records processed.
Phase duration (Orphan file record recovery): 0.95 milliseconds.
0 bad file records processed.
Phase duration (Bad file record checking): 0.92 milliseconds.
Stage 2: Examining file name linkage ...
Deleted invalid filename 01. 第一章 アシタカ??記.xml (1495) in directory 13C.
The NTFS file name attribute in file 0x1495 is incorrect.
30 00 31 00 2e 00 20 00 2c 7b 00 4e e0 7a 20 00 0.1... .,{.Nàz .
a2 30 b7 30 bf 30 ab 30 3f 00 3f 00 18 8a 2e 00 ¢0·0.0«0?.?....
64 00 66 00 66 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? d.f.f...........
File 1495 has been orphaned since all its filenames were invalid
Windows will recover the file in the orphan recovery phase.
Correcting minor file name errors in file 1495.
Deleted invalid filename 01. 第一章 アシタカ??記 (2).xml (1496) in directory 13C.
The NTFS file name attribute in file 0x1496 is incorrect.
30 00 31 00 2e 00 20 00 2c 7b 00 4e e0 7a 20 00 0.1... .,{.Nàz .
a2 30 b7 30 bf 30 ab 30 3f 00 3f 00 18 8a 20 00 ¢0·0.0«0?.?.. .
28 00 32 00 29 00 2e 00 64 00 66 00 66 00 ?? ?? (.2.)...d.f.f...
File 1496 has been orphaned since all its filenames were invalid
Windows will recover the file in the orphan recovery phase.
Correcting minor file name errors in file 1496.
1 reparse records processed.
Unable to locate the file name attribute of index entry 01. 第一章 アシタカ??記 (2).xml
of index $I30 with parent 0x13c in file 0x1496.
Deleting index entry 01. 第一章 アシタカ??記 (2).xml in index $I30 of file 13C.
Unable to locate the file name attribute of index entry 01. 第一章 アシタカ??記.xml
of index $I30 with parent 0x13c in file 0x1495.
Deleting index entry 01. 第一章 アシタカ??記.xml in index $I30 of file 13C.
6568 index entries processed.
Index verification completed.
Phase duration (Index verification): 3.04 seconds.
CHKDSK is scanning unindexed files for reconnect to their original directory.
0 unindexed files recovered to original directory.
Phase duration (Orphan reconnection): 2.54 milliseconds.
CHKDSK is recovering remaining unindexed files.
Lost and found is located at \found.000
Phase duration (Orphan recovery to lost and found): 57.12 milliseconds.
1 reparse records processed.
Phase duration (Reparse point and Object ID verification): 2.89 milliseconds.
Stage 3: Examining security descriptors ...
Cleaning up 2 unused index entries from index $SII of file 0x9.
Cleaning up 2 unused index entries from index $SDH of file 0x9.
Cleaning up 2 unused security descriptors.
Security descriptor verification completed.
Phase duration (Security descriptor verification): 36.37 milliseconds.
596 data files processed.
Phase duration (Data attribute verification): 1.35 milliseconds.
Correcting errors in the master file table's (MFT) BITMAP attribute.
Windows has made corrections to the file system.
No further action is required.
976728027 KB total disk space.
896403980 KB in 4658 files.
1736 KB in 599 indexes.
101131 KB in use by the system.
65536 KB occupied by the log file.
80221180 KB available on disk.
4096 bytes in each allocation unit.
244182006 total allocation units on disk.
20055295 allocation units available on disk.
Total duration: 3.37 seconds (3379 ms).