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
jd510jd510 

Internationalization Issue

Hello Dev Community:

Issue:

When trying to access characters from the Central European character set (Microsoft’s code page 1250) question marks are returned.

I’m using Outbound Messages and the API.  The Outbound Message itself contains the correct Hex values.  However, as stated above, when a method call is made on the object, question marks are returned (see code below).


Background:

Edition: Unlimited

Encoding: UTF-8

 
Data:

ŠŚŤŽŹšśťžź

 
Outbound Message:

<sf:FirstName>&#x160;&#x15A;&#x164;&#x17D;&#x179;&#x161;&#x15B;&#x165;&#x17E;&#x17A;</sf:FirstName>

 
Code:

public class ClientNotificationBindingImpl implements com.sforce.soap._2005._09.outbound.ClientNotificationPort{

    public boolean notifications(java.lang.String organizationId, java.lang.String actionId, java.lang.String sessionId, java.lang.String enterpriseUrl, java.lang.String partnerUrl, com.sforce.soap._2005._09.outbound.ContactNotification[] clientNotification) throws java.rmi.RemoteException {

 

      // Loop through the ContactNotification array, retrieve the objects, and process them.

      for (int i = 0; i < clientNotification.length; i++) {

            // Retrieve the object type from the object.

            String objectType = clientNotification[i].getSObject().getClass().getSimpleName();

             // Debugging
            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getFirstName: " + clientNotification[i].getSObject().getFirstName());

            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getLastName: " + clientNotification[i].getSObject().getLastName());

            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getMiddle_Initial__c: " + clientNotification[i].getSObject().getMiddle_Initial__c());

      }

    }

}

 

Log:

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getFirstName: Š??Ž?š??ž?

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getLastName: Š??Ž?š??ž?

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getMiddle_Initial__c: null

 

Question:

How do I retrieve the correct value instead of the question marks?

Thanks in advance,
jd

 

werewolfwerewolf
Are you sure you've really got question marks in there, and it's not just that the font in which you're debug logging doesn't support those characters?  Maybe have a look at that string in debug mode and see if it's actually got the right stuff.  As you said, the outbound message has the right data, so it's just a matter of getting Java to pick it up, but Java String is unicode so it should work transparently.
Rick.BanisterRick.Banister
We ran into this converting Czech data. It is a real problem with Eastern European data, not just a phantom of your font sent. Salesforce does not claim to support this region; we're not convinced that Salesforce is the issue though.
 
The problem seems to be related to your language settings on your computer, or if you use a SQL Server database. SQL Server is a UCS-2 database, and Salesforce data is UTF-8.
 
We were able to migrate legacy data into Salesforce, but not able to copy it back to a SQL database. Oracle UTF-8 seems to work a lot better. However, the real deal is to have your computer set up to handle the proper character set.


Message Edited by Rick.Banister on 04-03-2008 08:15 AM
jd510jd510
Thank you for the information.

Please explain what you mean by "have your computer set up to handle the proper character set."  Are you referring to changing the language setting on the Windows (in my case) box?  Or are you referring to the application server's setting?

Best,
jd
Rick.BanisterRick.Banister
I am referring to the language settings on the machine where you do the actual interaction. Windows needs to have the foreign language / character settings set properly to know how to interpret the data.
jd510jd510
Hello Rick:

Thanks for the response. 

I wanted to confirm your previous response.  I have asked our IT department to check the languages on the server.  I'll keep the community posted.

Best,
jd