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

How do you change character encoding of a file under source control

We stumbled across some c code (.cpp file) that is causing us a little grief that we are trying to resolve.

We have a number of cpp files under source control in but for some reason this one file gives us a "unsupported character encoding" on trying to open the file.   In thre RTC client we can set the encoding UTF8 to see  its contents but the "change" does not stick.  

How do we change the encoding on a file already checked in?  This file has does have french characters but i don't think this is an issues as coping the file aside (within the workspace) opens without issue. 

 

0 votes


Accepted answer

Permanent link
Hi Norman,

To change the file's encoding on server side, you need to load the file into an Eclipse project, then right-click the file and select "Properties". In the Properties, set the file encoding to "UTF-8". Then you need to make slightly change on the file content, so you can check-in/deliver the file from Pending Changes.
After that if you open the repository files from the workspace or stream and check it properties, you can see the file encoding is updated.

You mentioned this is a .cpp file. if you are using Visual Studio client, there's no direct way to modify a single file's properties. You need to edit magic.properties file (refer to https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/t_magicproperties.html&scope=null) to change the file's encoding on client side first, then modify the file and check-in to server side.

Ralph Schoon selected this answer as the correct answer

0 votes

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
× 1,381

Question asked: Feb 24 '15, 11:49 a.m.

Question was seen: 8,103 times

Last updated: Mar 02 '15, 5:20 p.m.

Confirmation Cancel Confirm