Skip to main content
Tweeted twitter.com/#!/StackSalesforce/status/291995232600473600
Talking with the author on skype - trying to clarify the use case here.
Source Link
ca_peterson
  • 23.2k
  • 7
  • 70
  • 123

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.

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.

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.

Source Link
user2238
  • 121
  • 1
  • 1
  • 3

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.