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

Component name in GCM allows to create with special characters "~!@#$%^&*()_+:"<>?:" WIll there be a problem when we use Rest / Oslc API to fetch component using its name?

 Hi,


GCM tool is allowed to create a component with special charcters "~!@#$%^&*()+:"<>?:
Is there any problem when we try to fetch components using special characters?

Above mentioned document link shows if Special characters like "%" and "" to be used with "LIKE" operator.

Kindly let us know if there a need to handle other special characters.

Thanks in advance

Regards,
Thiru

0 votes


Accepted answer

Permanent link
Hi Thiru,

I tried 2 examples with mixed success. I created components with the following names:
Component "abc"
Component ~!@#$%^&*()_+:<>?:

An OSLC query for components in that project area without specifying oslc.where returned both components as expected.

 I tried a query with [unencoded] query dcterms:title="Component \"abc\"" . So the GET was from https://localhost:9443/gc/oslc-query/components/_BK0hIIpOEey3Ft6q3I-bSg?oslc.where=dcterms%3Atitle%3D%22Component%20%5C%22abc%5C%22%22 . That didn't find the component. That should have worked but didn't. I will submit a defect against that and investigate when I get the chance.

I tried a query using % to match the embedded double quotes using an [unencoded] query dcterms:title="Component %abc%" . So the GET was from https://localhost:9443/gc/oslc-query/components/_BK0hIIpOEey3Ft6q3I-bSg?oslc.where=dcterms%3Atitle%3D%22Component%20%25abc%25%22 . That worked and found the first component.

 I tried a query for [unencoded] query dcterms:title="Component ~!@#$%^&*()_+:<>?:" . So the GET was from https://localhost:9443/gc/oslc-query/components/_BK0hIIpOEey3Ft6q3I-bSg?oslc.where=dcterms%3Atitle%3D%22Component%20~%21%40%23%24%25%5E%26%2A%28%29_%2B%3A%3C%3E%3F%3A%22 . That returned the 2nd component ok.

In GCM 7.0.2iFix08 onwards, there are some characters that are automatically removed and or replaced from the names of components, configurations, type resources, user queries. These centre around Unicode control characters and Unicode whitespace characters. For example, embedding a zero-width non-printing space character is just likely to cause confusion, as is embedding multiple space characters between words in names. So if you try to create a component with name abc    def it will get collapsed to abc def .

I would avoid using unnecessarily exotic characters in the names of GCM resources. Just because you can doesn't mean it's a good idea to do so. Think of visually impaired users who might struggle to see some punctuation characters.
Thiruvenkadam Dhanaraj selected this answer as the correct answer

0 votes


2 other answers

Permanent link

I submitted 548525: OSLC query doesn't find component with name Component "abc".

0 votes


Permanent link

 Thank you David Honey. This answer helped me a lot to proceed further with my implementations.

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
× 10,927
× 7,487
× 1,316
× 18
× 5

Question asked: Feb 10 '22, 1:54 a.m.

Question was seen: 1,474 times

Last updated: Feb 10 '22, 6:27 a.m.

Confirmation Cancel Confirm