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

REST API returen comments with &nbsp

Hi, with the following REST API to get comments of one workitem, if the comments has Chinese, the blank space returns with &nbsp. I think other special characters also will be transferred. If the comments only contain English, the black space shows well, not as &nbsp.

https://xxx:9443/ccm/oslc/workitems/_6-bVYEykEeaVtcyBP4Fqvw/rtc_cm:comments/1?oslc_cm.properties=dc:created,dc:description

This will introduce more work to deal with the return data from REST API. I want to know why this occur, and is there a way or REST API attribute to get Chinese comments without escaping?

0 votes



One answer

Permanent link
They are different spaces, one is "non-breaking space", and the other normal "white space". Their codes (in any encoding) are different. Also note that when you use different Chinese input methods to type the "non-breaking space" (全角空格), the codes for the "non-breaking space" can be very different.

As for not escaping the special characters, I don't think it's a good idea since the content has to conform to certain specification.

1 vote

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
× 18

Question asked: Jul 19 '16, 3:16 a.m.

Question was seen: 2,088 times

Last updated: Jul 20 '16, 12:13 a.m.

Confirmation Cancel Confirm