Print this page

Character Encoding using API

Knowledge Article Number 000002628
Description

Can you help us identify the character encoding for the response that SFDC is sending back? 
Is there a way we can change the character encoding for our org? Or can you do it on request? 
We need it to be UTF-8.

Resolution

 

  • The API supports either full Unicode characters or ISO-8859-1 characters. The character set for your organization depends on the Salesforce instance your organization uses. If your organization logs into ssl.salesforce.com, then your encoding is ISO-8859-1. All other instances use UTF-8. You can determine the character set for your organization by calling describeGlobal() and inspecting the encoding value returned in the DescribeGlobalResult.
  • If your organization uses ISO-8859-1 encoding, then all data sent to the API must be encoded in ISO-8859-1. Characters outside the valid ISO-8859-1 range might be truncated or cause an error.
  • The API response is encoded in the character set used by your organization (UTF-8 or ISO-8859-1). Either way, the encoded data is usually handled for you by the SOAP client.
 
This is documented here.




promote demote