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

How to set character encoding for file in RTC server

 Hi All,


I wanted to briefly explain the issue that occurs with CP1252 on RTC. There are two character encodings used throughout the codebase, CP1252 and UTF-8. The two seem to be more or less compatible with each other, but every now and again we get issues caused by the copyright symbol located in the header of some of our source code files. The issue can occur in one of two ways: <o:p> </o:p>

  • Check out file in CP1252 -> Editor converts to UTF-8 -> Check in UTF-8 <o:p> </o:p>
  • Check out file in UTF-8 -> Editor converts to CP1252 -> Check in CP1252 <o:p> </o:p>

Then when the auto merge and build process kicks off we get errors and merge conflicts caused by the fact that the software is unable to deal with files that in both formats. <o:p> </o:p>

IE: Trying to merge a CP1252 file and a UTF-8 file causes a merge conflict. Sometimes the conversation between the two can corrupt the copyright character resulting in a frameshift for interpretation by a compiler. <o:p> </o:p>

<o:p>   </o:p> This format changed is caused by the fact that our laptops and desktops have a version of windows that uses CP1252 as the primary character set encoding, which some editors pick up on. Some people use software that automatically changes source code files to UTF-8 or manually change their character set encoding to UTF-8.

<o:p> </o:p>

So we would like to know is there a way to set the property to default either UTF-8 or CP1252 in RTC server properties or in project area.


Thanks,

Vinay

0 votes


Accepted answer

Permanent link
Hi Vinay,

This below solution could be of help
vinay kumar bondugula selected this answer as the correct answer

0 votes

Comments

In addition, it is possible to set the encoding to be used in the RTC Eclipse client this way: 


Window>Preferences then open General>Workspace at the bottom you can select the encoding to use. On Windows default is Cp1252. I usually set that to UTF-8.

 Hi,


Here our expectation is setting the default property on RTC application and it should be applied on all project areas..

Thanks,
Vinay

No statement here talks about project areas because the file encoding has nothing to do with project areas. See https://jazz.net/forum/questions/174823/how-do-you-change-character-encoding-of-a-file-under-source-control/174857 again for file based changes. 


The clients/editors are responsible for the character encoding and as explained in https://jazz.net/forum/questions/174823/how-do-you-change-character-encoding-of-a-file-under-source-control/174857 and in the comment above you might (or might not) be able to set a default for the client and change the encoding on the server side. 

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
× 12,029

Question asked: May 23 '19, 2:10 a.m.

Question was seen: 3,276 times

Last updated: May 23 '19, 4:14 a.m.

Confirmation Cancel Confirm