Silverpop / engage-api-client

Engage API Client Code
Apache License 2.0
13 stars 24 forks source link

engage-api-client and UTF-8 requests #52

Closed bdbavis closed 8 years ago

bdbavis commented 8 years ago

It seems that the API fails to handle Cyrillic letters when sending them to Engage.

smitchelus commented 8 years ago

@bdbavis, could you provide more detail? Some examples of the calls you are making?

bdbavis commented 8 years ago

@smitchelus I'm using AddRecipientCommand() to add new contact to my DB on Silverpop, One of the columns that i'm sending on my request is the name of the customer. When the name contain Cyrillic letters like чийнбд it appears on DB as ?????. I think that the problem is that the client API does not use UTF-8 when sending the request to Engage.

smitchelus commented 8 years ago

@bdbavis, if you need to use an encoding other than your JVM's default encoding then you would need to wrap the API command in an EncodedApiCommand and specify the desired encoding in there.

For example: ApiCommand command = commandFactory.createSaveMailingCommand(mailing); EncodedApiCommand encodedCommand = new EncodedApiCommand(command, "UTF-8");

bdbavis commented 8 years ago

@smitchelus thanks... you helped me a lot :-)