IBM / zOS-Client-Web-Enablement-Toolkit

Apache License 2.0
38 stars 15 forks source link

Problems with Codepage Conversion when using CCSID 1141 #28

Closed CexyChris closed 3 years ago

CexyChris commented 3 years ago

Hello there,

since I am working at a german software shop, we are using CCSID 1141. But apparently CWET by default is expecting 1140, so some codepoints are shifted when the request is send to a webserver. My use case here is that I want to send a request to our CICS Management Client Interface (CMCI) JVM Server to use its GraphQL API. I obviously need curly brackets ( '{' '}' ) for my request, but those are not the same codepoints in CCSID 1141 as in 1140. So for now my request looks like this: /graphql?query=äcicsplexesänameüü The same problem would occur for pipes ( '|' ) and exclamation marks ( '!' ), I suppose. Is there a possibility to tell CWET which CCSID am using? Or maybe do I have to tell the webserver itself?

Kind regards

blairwyman commented 3 years ago

Hello. CWET only supports CCSID 1047, but I don't think that is your problem here (at least not yet).

The RFC for a URI only allows a few 'unreserved' characters in a URI, and the list does not include curly braces, so I believe that if you percent-encode the (ASCII) values for the curly braces in your URI that you may have better results, like:

Ex: /graphql?query=%7Bcicsplexes%7Bname%7D%7D

Hope this helps.

gorelikg commented 3 years ago

@CexyChris did @blairwyman advice help you resolve the issue? May i close this or are you still stuck?

CexyChris commented 3 years ago

Hello, the advice was helpful, but I had no real chance to test it yet, because I am indeed still stuck... Nevertheless, you may close this issue. Thank you so far and sorry for the late answer!