Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC SCM Character Encoding and Line Delimiters when creating files programatically

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.

0 votes



One answer

Permanent link

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.

1 vote

Comments

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 ?

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941
× 1,202

Question asked: Aug 17 '17, 12:47 a.m.

Question was seen: 2,900 times

Last updated: Aug 18 '17, 4:54 a.m.

Confirmation Cancel Confirm