OSLC API and character encoding
Hi,
Accepted answer
I tried pasting smart quotes “hello” from Word into a DN artifact. When I get the RDF for that artifact using REST API, it appears as “hello” - I observe that the RDF doesn't specify an encoding so I assume the default would be UTF-8
Comments
Thanks Ian, I'll give that a try.
So, I've added some code to encode in this way
Ah - just noticed my webclient class has Windows-1252 set in it, which may be overriding what I'm setting. I'll look at changing that
That was the issue. The .net class has an encoding attribute, so what ever I was specifying was being overridden by the class attribute. It's now successfully added the escaped content, so I'll try without, but confident that it will be ok now. Thanks again for your assistance, much appreciated.
2 other answers
I'm having some issues with importing artifacts from a spreadsheet using the OSLC API when "special" characters are in use. The standard DOORS Next import works fine, so I know this should work.
This would assume that the DOORS import uses OSLC, which is very certainly not the case. Even if it was using it does not mean that it would not have to encode data in certain cases.
Are you specifying the character set in your PUT or POST
Content-Type
header?
For example:
Content-Type=text/turle; charset=utf-8
Comments
Ah, I've been specifying in the XML. Thanks, I'll give this a try
I've set the post Content-Type to application/xml; charset=utf-8 but still the same error
Since you provide pretty much no information beyond it is not working, I don't know how anyone should be able to help. You can try to create a requirement based on your display data and see if that even works.