(Warning: SSIS expert, SalesForce Noob)

Hi all

I'm working an SSIS package where the source is Salesforce.com and every character field is being interpreted by SSIS as a Unicode nvarchar, which is designed for a lot of foreign languages and takes two bytes per character. Non-Unicode varchar's take only one byte per character and works fine with US-English.

Since the data is all for clients in US-Ohio I'll assume for the moment that varchar would work fine.

Question: Is there a SOQL data type for non-Unicode characters that I can use in my SOQL statements to pull data, so that SSIS will interpret the columns as non-Unicode and not Unicode?

Thanks in advance. Jim


Edit to actually answer the question: No, there isn't a way to get Salesforce to talk to you in anything but UTF-8.

I thought salesforce only ever speaks UTF-8 but it turns out one instance uses 8859-1, at least I think ssl.salesforce.com is the NA0 instance. The documentation says:

Internationalization and Character Sets

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.

My own experience with SSIS isn't huge, but in the projects I've done I always used nvarchar for everything. I took my lead on this from a product called DBAmp which automatically creates MSSQL databases from Salesforce, and it used nvarchar for text fields.

| improve this answer | |
  • In other words, if you're a customer less than 10 years old (approximately), you'll need UTF-8-sized characters to avoid errors. – sfdcfox Dec 15 '14 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.