For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
24 1 1 6

Issue with special characters in World Check One Screening

For World Check One screening, we use HTML encoding for organization names and UTF-8 encoding for entire post data. It works without any issue for most of the special characters. However, for ampersand (&) and apostrophes (‘), it converts those characters into & and ' when case is created in World Check One and match results change. You can refer attached screenshot.

Do you recommend not to use HTML encoding? Does UTF-8 encoding take care of all special characters and no other encoding is needed?

specialchar-issue.jpg
world-checkworld-check-one
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
2.4k 5 5 5

@Sugam Surve

Hi,

UTF-8 encoding will take care of all the special characters, you need not do HTML encoding.

Below are the steps, in general, suggested when

1. You can avoid the issue by encoding the request payload as ‘utf-8’ and then use it to calculate the content length of the payload

2. This is mandatory if you're trying to screen names with special characters. This is done to properly calculate the content byte length and not the string length. It’s the length of the content/payload sent to the API which determines that the request will succeed or not, if your request contains special characters. Also, when the payload is being sent in the request, it has to be sent as UTF-8 encoded.

Below are the simplified steps to achieve the same:

  1. The content body should be converted to UTF-8.
  2. Calculate the length of the UTF-8 encoded content. Putting it simply, the length of UTF-8 encoded content is different than the normal payload body.
  3. Use the normal payload/content body in the dataToSign variable.
  4. Use the content length of the UTF-8 encoded in the dataToSign variable.
  5. Send the UTF-8 encoded content/payload in the API request.
  6. Send the content length of the UTF-8 encoded in the request header.
  • Kindly try the same request using Postman. If it is successful, check the authorization headers and the content length in it and make sure the authorization header and the content length that they are sending via your code is also the same. This should give a success response.
  • Do not include “charset”=UTF-8 as headers while sending the requests, this will not solve the problem. We do not expect the charset in the request and hence it will result in an error.

Hope this helps.

Regards,

Mehran Khan

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea