Issues with UTF-8 encoding in emails #19

Closed
sirupsen opened this Issue Aug 7, 2012 · 6 comments

Comments

Projects
None yet
4 participants
@sirupsen

sirupsen commented Aug 7, 2012

Hi,

Reading the source and the CampaignMonitor documentation it's quite clear that it accepts UTF-8 encoded data. However, the following script does not work with createsend-ruby:

#encoding=utf-8
require 'createsend'
CreateSend.api_key '<snip>'

puts CreateSend::VERSION

CreateSend::Subscriber.add('<snip>', "jøsses@bådbasæn.dk", "Tester", [], false)

Trace:

1.1.1
/Users/sirup/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/createsend-1.1.1/lib/createsend.rb:141:in `handle_response': The CreateSend API responded with the following error - 1: Please provide a valid email address. (CreateSend::BadRequest)
        from /Users/sirup/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/createsend-1.1.1/lib/createsend.rb:134:in `post'
        from /Users/sirup/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/createsend-1.1.1/lib/createsend/subscriber.rb:30:in `add'
        from hej.rb:7:in `<main>'

It works fine with special characters in the name. I wrote to CampaignMonitor support as well to ask finally if they accept special characters in email (as they should).

@jdennes

This comment has been minimized.

Show comment Hide comment
@jdennes

jdennes Aug 7, 2012

Contributor

You'll notice that even the regular subscribe forms you can generate from within the app don't accept the email address jøsses@bådbasæn.dk.

So, your email to support is the best direction to take. Making changes to the createsend gem can't fix this issue.

Contributor

jdennes commented Aug 7, 2012

You'll notice that even the regular subscribe forms you can generate from within the app don't accept the email address jøsses@bådbasæn.dk.

So, your email to support is the best direction to take. Making changes to the createsend gem can't fix this issue.

@jdennes jdennes closed this Aug 7, 2012

@sirupsen

This comment has been minimized.

Show comment Hide comment
@sirupsen

sirupsen Aug 8, 2012

I emailed support, thanks for confirming the issue is not with createsend-ruby. :)

sirupsen commented Aug 8, 2012

I emailed support, thanks for confirming the issue is not with createsend-ruby. :)

@thejspr

This comment has been minimized.

Show comment Hide comment
@thejspr

thejspr Aug 6, 2015

@sirupsen what was the solution to this problem? I'm having the exact same issue.

thejspr commented Aug 6, 2015

@sirupsen what was the solution to this problem? I'm having the exact same issue.

@sirupsen

This comment has been minimized.

Show comment Hide comment
@sirupsen

sirupsen Aug 16, 2015

@thejspr I don't remember :( It's been too long. Perhaps @mkyed can grep the code if we still use Campaign Monitor?

@thejspr I don't remember :( It's been too long. Perhaps @mkyed can grep the code if we still use Campaign Monitor?

@mkyed

This comment has been minimized.

Show comment Hide comment
@mkyed

mkyed Aug 17, 2015

We do not do anything special to support utf-8 characters but have had no complaints about it either 😄 I guess the best way to work around it is to IDN/punycode convert the email address before sending it to CM.

mkyed commented Aug 17, 2015

We do not do anything special to support utf-8 characters but have had no complaints about it either 😄 I guess the best way to work around it is to IDN/punycode convert the email address before sending it to CM.

@thejspr

This comment has been minimized.

Show comment Hide comment
@thejspr

thejspr Aug 25, 2015

Thanks @sirupsen and @mkyed. CM does indeed not support non-latin characters in emails so there is not much to do but handling the raised exception.

thejspr commented Aug 25, 2015

Thanks @sirupsen and @mkyed. CM does indeed not support non-latin characters in emails so there is not much to do but handling the raised exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment