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. |
2 answers
![]()
Geoffrey Clemm (30.1k●2●30●35)
| answered Dec 22 '14, 11:58 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 saw some mention of LINE_DELIMITER custom field you can add to your stream or view in clear case for syncs between CC and RTC. Do you know if ccc export ccase performs any line delimiter translation? The change is apparent on the very first versions to arrive in RTC, but is not there in CC so I am thinking either export or import performed the change.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Yes, if you specify that the line delimiter in the RTC database should be different from that in the CC VOB, then the importer will attempt to modify the line endings, so you should declare that the line endings are the same.
Since this was a one time import, does this still apply? I am not sure where the ClearCase Provider Properties would be in the case where I use ccc import ccase just once.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I haven't used the "ccc export/import ccase" version importer tool, so I've forwarded this question to the version importer dev team, so they can comment.
|