I'm having issues sending UTF-8 data correctly to a data extension. When I try to send values such as ジョシュ, it ends up being saved as ã¦ã©ã¼ã©ã¼ ã¸ã§ã·ã¥.

I tried to convert the encoding before sending, but that doesn't seem to work. I can debug from my local machine and it shows the correct value, but when it finally reaches the DE, it shows blank values after adding a converted encoding value.

Thanks for your time.

  • 2
    I don't understand the question... is this an Exact Target question? If so, could you please tag as such (exacttarget)? There are a lot of folks here who know the core Salesforce product but not Exact Target, and vice versa. It will help your question get the right audience. – Jason Clark Aug 19 '14 at 21:30

File encoding must include the Byte Order Mark. So the encoding would not be UTF-8 but rather UTF-8 + BOM.

| improve this answer | |
  • I'm a little confused by this. Doesn't UTF-8 by default include BOM? I tried to convert my string data using this method stackoverflow.com/questions/5601904/…. This doesn't seem to help. Is there a way in PHP to make sure I am sending the string data as UTF-8 BOM? Would I use mb_convert method? – Josh Waller Aug 26 '14 at 13:29
  • "The Unicode Standard permits the BOM in UTF-8, but does not require or recommend its use." --wikipedia So no, UTF-8 does not by default include a BOM nor is it of any particular use in the actual encoding process. However, it would appear that ExactTarget looks for it as a designation that foreign languages are present in the file. – Alex Finger Aug 26 '14 at 13:36
  • $encoded_string = "\xEF\xBB\xBF".$encoded_string; Where the $encoded_string prior to that line is UTF-8 encoded. Try that. – Alex Finger Aug 26 '14 at 13:40
  • Thank you for the example, but it still doesn't seem to encode correctly. The value in the data extension for first and last name show as ã¸ã§ã·ãÂÂ¥ ã¦ã©ã¼ã©ã¼. My string data is originally ASCII, which is a subset of UTF-8, but to be sure if was exactly UTF-8, I used utf8_encode() for both the first and last name strings and then used the example above to add BOM. – Josh Waller Aug 26 '14 at 14:16
  • 1
    So it looks like the actual fix was removing the uft8_encode surrounding $objWSSE->saveXML(). I believe what is happening is it is being double encoded. Anyways, I tried this with multiple languages and it is sending correctly now after removing the utf8_encode(). Thank you for helping me debug the issue. – Josh Waller Aug 27 '14 at 19:53

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.