function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TesterInSkyTesterInSky 

about API call encoding

We noticed that in Enterprise and Partner WSDL, it uses UTF-8 as the encoding char set. Is this the only encoding used by Salesforce.com API call? Is there a configuration for us to change this encoding?


Message Edited by TesterInSky on 01-19-2009 07:39 PM
shillyershillyer

According to the doc:

The API supports either full Unicode characters or ISO-8859-1 characters...

Hope that helps,

Sati



Message Edited by shillyer on 01-19-2009 09:28 PM
TesterInSkyTesterInSky
Thanks Shillyer!

Is there a configuration in Salesforce to explicitly set the char set to either UTF-8 or ISO-8859-1?
shillyershillyer

Not that I'm aware of, it appears it's based off your instance.

ISO-8859-1 for ssl.salesforce.com

UTF-8 for all other instances,

Best,
Sati
SuperfellSuperfell
Also note that even if you send a request that's not using utf-8, the response will be in utf-8. Can i ask why you don't want to use utf-8?
TesterInSkyTesterInSky
What does 'log into ssl.salesforce.com' mean? I could log into http://ssl.salesforce.com through web, but how to logs into it by using org.apache.axis.client.Call? I could set the server URL by using:
Code:
call.setProperty("javax.xml.rpc.service.endpoint.address", "https://www.salesforce.com/services/Soap/u/14.0")

 But failed after I changed the url to 'ssl.salesforce.com'.
 
I'm now writing a client tool to do some simple call to Salesforce. If Salesforce also supports ISO 8859-1, I may need also to take it into consideration.
 
 
SuperfellSuperfell
IIRC, axis generates UTF-8 requests by default, which should do the right thing. As per the WSDL, login calls should goto www.salesforce.com/....
SuperfellSuperfell
Plus, if you're working in java, then java is utf-16 (i.e. unicode) internally, so using a non unicode serialization to call the api makes even less sense.
mbiamontembiamonte

I have the same question.

 

I agree that if I were setting up a Salesforce instance, I can't think of why I would want to use anything other than the UTF-8 encoding.  However since Salesforce supports both UTF-8 and ISO-8859-1, that implies that there are instances that do use ISO-8859-1.  If I am writting a client tool that is to work with any arbitrary Salesforce instance, how can I verify that it will work with an ISO-8859-1 instance

 

Mark

SuperfellSuperfell
na0 is the only instance that's iso-8859-1, the API on that instance still accepts UTF-8 encoded messages (but obviously you can't store anything other than characters from the 8859-1 character set in there), all you need to do is make sure your tool is not mangling the character encodings on the client side of the api, and that's really all you can do (assuming the data is actually coming from somewhere else).
mbiamontembiamonte

The fact that the API accepts utf-8 messages even for iso-8859-1 instances is the piece of info I needed. 

 

Thanks

Mark

SuperfellSuperfell
Ahh, sorry that's not clear.