" " symbols were found while using contentManager.storeContent() API
Hi All,
I am using contentManager.storeContent() API to upload the "process template" contents to the server.
But, when i use BC(beyond Compare) tool for spectification.txt to see the changes, i found some strange symbol in the text file like " " as below.
Please let me know weather there is any mismatch attribute used in the below API or something i need to change.
-------------------------------------------------------------------------------------------------------------------------------------
<property name="text" type="xsd:string"> </property>
<property name="text" type="xsd:string"> </property>
<property name="text" type="xsd:string"> </property>
<property name="text" type="xsd:string"> </property>
--------------------------------------------------------------------------------------------------------------------------------------
attachmentContent =
this.teamRepo.contentManager().storeContent(
attachmentType,
attachmentType.startsWith("text") ? "UTF-8" : null,
attachmentType.startsWith("text") ? LineDelimiter.LINE_DELIMITER_PLATFORM
: LineDelimiter.LINE_DELIMITER_NONE, new FileInputStream(attachmentFile), null, taskMonitor);
------------------------------------------------------------------------------------------------------------------------------------------
I am using contentManager.storeContent() API to upload the "process template" contents to the server.
But, when i use BC(beyond Compare) tool for spectification.txt to see the changes, i found some strange symbol in the text file like " " as below.
Please let me know weather there is any mismatch attribute used in the below API or something i need to change.
-------------------------------------------------------------------------------------------------------------------------------------
<property name="text" type="xsd:string"> </property>
<property name="text" type="xsd:string"> </property>
<property name="text" type="xsd:string"> </property>
<property name="text" type="xsd:string"> </property>
--------------------------------------------------------------------------------------------------------------------------------------
attachmentContent =
this.teamRepo.contentManager().storeContent(
attachmentType,
attachmentType.startsWith("text") ? "UTF-8" : null,
attachmentType.startsWith("text") ? LineDelimiter.LINE_DELIMITER_PLATFORM
: LineDelimiter.LINE_DELIMITER_NONE, new FileInputStream(attachmentFile), null, taskMonitor);
------------------------------------------------------------------------------------------------------------------------------------------
One answer
I'd check what the encoding was when downloading the content.
Comments
Hi Ralph,
When i update the process template through mentioned RTC API , the specification.txt does not show any special character. Once update is done and i download the project area from the RTC then i can see the special character in the specification.txt.
I can't comment on that. I don't even know what you are achieving here. Maybe you use the wrong storeContent() method or your case is not really covered.
If you mean, you are manipulating the process XML and storing that data, then this is done in a different way, if I am not mistaken.