1

I'm receiving some answers from an API and they are coming to me like this:

enter image description here

There's a way to handle with this since it is coming from the API? I've tried some encodingUtil methods, but I couldn't get the result I need.

2
  • What character encoding is used here? Do you have a way to find out?
    – sfdcfox
    Jan 13 at 21:55
  • Yes, they are "ã" and "ç"
    – Sabrina T.
    Jan 14 at 11:45
2

So, most likely the 3rd party system received input encoded in a way not directly translateable to UTF-8 and the third party system substituted the mis-encoded character using the UTF-8 � character that means unrecognized

It is a perfectly legitimate UTF-8 character and without some lexical analysis to guess at what the character should be (typically, a character with a diacritical mark), you are stuck with it.

example - do a replace of all servi�o with serviço

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.