It's all about the answers!

Ask a question

RTC SCM Character Encoding and Line Delimiters when creating files programatically


Jazzuser user (681050) | asked Aug 17 '17, 12:47 a.m.

Hello All,

We have a usecase wherein we have to checkin and deliver set of given files to RTC SCM stream.

currently, we have the logic to copy the contents of the file : IFileContent storedzipContent = contentManager.storeContent(
                 IFileContent.ENCODING_UTF_8,
                 FileLineDelimiter.LINE_DELIMITER_NONE,

                 new VersionedContentManagerByteArrayInputStreamPovider(
                         contents.toByteArray()), null, fMonitor);

We are using the same encoding type and line delimiter for all the types of file : .txt, .zip, .xlsx, .docx etc

However the files are getting created and checkedIn in the stream, we create a repository WS and load this set of files, checkedIn.

We try to change the contents of the file,in the pending changes view (by double clicking on the file --> view difference window), we see that the property of the file will be set to Windows default : cp1252 and line delimiter as platform/none accordingly.

Are there any issues, in future like resolving merge conflicts etc(or with any RTC eclipse functionalities), if we have encoding type as UTF-8 and line delimiter as none for all the files ?

Please suggest.

Thanks.

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Aug 18 '17, 3:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I think the encoding and the line delimiters are important for compare merge operations. But only an experienced Jazz SCM developer could tell for sure.


Comments
Jazzuser user commented Aug 18 '17, 4:20 a.m.

Thanks for the reply Ralph. We wanted the encoding to be of windows 1252 :
 IFileContent storedzipContent = contentManager.storeContent(
                     "windows-1252",
                 FileLineDelimiter.LINE_DELIMITER_NONE,
                 new VersionedContentManagerByteArrayInputStreamPovider(
                         contents.toByteArray()), null, fMonitor);

Can we have this ? this is not visible as a default option from RTC API ?


Ralph Schoon commented Aug 18 '17, 4:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't know. Since the Eclipse client supports that, I think you should be able to do that. Again, I typically make sure to create content the way I want it with the Tools and the I look into their representation in the API. That s usually the easiest way to make sure what you want works.

Sorry, but that is pretty much all I can say.  

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.