It's all about the answers!

Ask a question

How to set character encoding for file in RTC server

vinay kumar bondugula (7312768) | asked May 23 '19, 2:10 a.m.

 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.



Accepted answer

permanent link
Bharath Rao (915138) | answered May 23 '19, 2:21 a.m.
Hi Vinay,

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

Ralph Schoon commented May 23 '19, 3:01 a.m.

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.

vinay kumar bondugula commented May 23 '19, 3:13 a.m.


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


Ralph Schoon commented May 23 '19, 4:10 a.m. | edited May 23 '19, 4:14 a.m.

No statement here talks about project areas because the file encoding has nothing to do with project areas. See again for file based changes. 

The clients/editors are responsible for the character encoding and as explained in 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 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.