2
Views
2
Comments
EmailAddressCreate encode error 
Question
When I use the EmailAddressCreate and in the first parameter I send a string with "special" characters I get an error.

Ex: EmailAddressCreate ("Smith, John", "john.smith@test.com");
      Result: "=?utf-8?Q?Smith,=20John?=" <john.smith@test.com>


Should I use somekind of encoding to the first parameter to escape some characters? Which characters are forbidden?


I'm using Platform version 6.0.1.16


Thanks,

Carlos Freitas
2012-03-16 12-21-09
João Rosado
Staff
Hi Carlos,

The ',' should be an acceptable character there, but it looks like it's not being encoded propertly.
I recommend to submit issue.

Regards,
João Rosado
2011-06-15 10-49-56
AcacioPN
Staff
Carlos Freitas wrote:
When I use the EmailAddressCreate and in the first parameter I send a string with "special" characters I get an error.

Ex: EmailAddressCreate ("Smith, John", "john.smith@test.com");
      Result: "=?utf-8?Q?Smith,=20John?=" <john.smith@test.com>


Should I use somekind of encoding to the first parameter to escape some characters? Which characters are forbidden?


I'm using Platform version 6.0.1.16


Thanks,

Carlos Freitas
 
Hi Carlos

You are not actually getting an error - you are getting a UTF-8 encoded value for the email. That is the way to encode non-US characters following RFC2047, which is also valid for any US characters, though it may seem redundant.

What happens is that the Agile Platform code that does the encoding is currently (6.0.1.18 / 7.0.0.5) being more conservative than expected - if the name contains characters others than non-accented letters, numbers or space, it will fall back to encoding per RFC2047, producing the string you presented.

Both forms are correct and must present correctly in the destination email clients if they respect norms, so this should not worry you.

Cheers,
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.