Skip to main content
2 of 2
Talking with the author on skype - trying to clarify the use case here.
ca_peterson
  • 23.2k
  • 7
  • 70
  • 123

Convert UTF-8 to ASCII

How can I convert a text file or a String from UTF-8 format to ASCII?

For example, the following string "ZÜRICH-ZOLLI" once outputted into a text file. If the file has the format UTF-8 is has 13 characters but when the format is ASCII the number of characters is 12.

The endpoint where the file is being sent only accepts the ASCII-encoded version, and fails on the UTF-8 encoded string salesforce normally produces.

user2238
  • 121
  • 1
  • 1
  • 3