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
    Commented Jan 13, 2022 at 21:55
  • Yes, they are "ã" and "ç"
    – Sabrina T.
    Commented Jan 14, 2022 at 11:45

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .