CCC imported XML UTF-16 line delimiter mangled
After importing UTF-16 XML files, the line delimiters are not correct. UTF-8 files appear to be fine. What we are seeing is in the original file in ClearCase, a new line would look like:
00 0D 00 0A
but the imported version of the file has:
00 0D 0A 00 0D 0A
This seems like a UTF-8 line delimiter changer was run against the UTF-16 files when it should have been UTF-16.
I am looking for a better understanding of how this came about. Does the import look to see if the file is UTF-16? Which part of the process exactly foes this, export or import? I am thinking we could run a UTF-8 tool against the files, looking for 00 0D 0A 00 0D 0A, and shrinking it to 00 0D 00 0A.
00 0D 00 0A
but the imported version of the file has:
00 0D 0A 00 0D 0A
This seems like a UTF-8 line delimiter changer was run against the UTF-16 files when it should have been UTF-16.
I am looking for a better understanding of how this came about. Does the import look to see if the file is UTF-16? Which part of the process exactly foes this, export or import? I am thinking we could run a UTF-8 tool against the files, looking for 00 0D 0A 00 0D 0A, and shrinking it to 00 0D 00 0A.
2 answers
I'm not aware of any way to specify the encoding during an import. If that is right, you'll want to import the files without a line-ending change, and then do the line-ending changes with a script after the import is completed.
Comments
I guess that this is a file encoding issue.
Please check Character Encoding property of the files in RTC. If it's not UTF-16LE, you may need to update the exported data to change file encoding before importing.
To update file encoding, update encoding command can be used;
'ccc update ccase encoding -d {data dir} -e UTF-16LE ...'
The exporter detects files that have unmappable characters in your system locale, and displays CRRTC4203W 'unencodable characters' warning. If the warning is displayed, you can find files to be updated in logs\unencodableTextFileVersions.txt file.
Please check Character Encoding property of the files in RTC. If it's not UTF-16LE, you may need to update the exported data to change file encoding before importing.
To update file encoding, update encoding command can be used;
'ccc update ccase encoding -d {data dir} -e UTF-16LE ...'
The exporter detects files that have unmappable characters in your system locale, and displays CRRTC4203W 'unencodable characters' warning. If the warning is displayed, you can find files to be updated in logs\unencodableTextFileVersions.txt file.