Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my attempt to resolve #17 #19

Closed
wants to merge 2 commits into from
Closed

Conversation

navroopsingh
Copy link

  • my attempt to resolve Support unicode email addresses #17 to cover unicode email address with characters uptil Integer 65535 as returned by charCodeAt( ) , in localpart and domain.

  • added 5 unicode test cases at the end.

  • updated 2 old test cases cases from

    ["@iana.org", "errExpectingATEXT"],
    ["test@.org", "errExpectingATEXT"]
    

    to

    ["@iana.org", "errNoLocalPart"],
    ["test@.org", "errDotStart"]

@kamronbatman
Copy link

@skeggse I don't mean to rush, but any news on whether this is ready for merging?

I went over the changes, and they look straight forward.

@skeggse
Copy link
Owner

skeggse commented Jul 26, 2016

Hey, sorry for not commenting. Here's why I haven't merged:

This PR does not handle full unicode code points, and doesn't back its changes up with references to the relevant RFCs. In my spare time, I've been reading through said RFCs, but there are quite a few that specifically related to unicode support in the email ecosystem.

@kamronbatman
Copy link

kamronbatman commented Jul 29, 2016

That is definitely fair! I have not read the RFCs, but I can imagine since they are detailed and long, it will take a while to implement them properly.

I am not good at interpreting RFCs, but I can definitely try and help if needed!

@WesTyler
Copy link
Contributor

WesTyler commented Feb 6, 2017

@navroopsingh @skeggse - is this PR still in progress?

We are needing to support international characters in our production code, and have Joi/isemail integrated throughout our codebase. If this PR has staled, we will have someone on our team work with you to see if we can't get RFC 6530 compliance worked in :)

@WesTyler
Copy link
Contributor

WesTyler commented Feb 6, 2017

[EDIT] sorry, didn't realize I was still commenting on the PR instead of the issue. Moving the comment that was here to the issue instead.

@WesTyler
Copy link
Contributor

WesTyler commented Feb 6, 2017

@skeggse - I left a couple of comments on #18 regarding the Dns.resolveMx calls for those test cases. Taking that into account, along with our RFC discussions in #17, what's missing from this PR? My solution was looking remarkably similar so far, haha. And while I didn't clone this fork down and run with lab, it looks like it doesn't break any Hapi style rules.

@WesTyler
Copy link
Contributor

WesTyler commented Feb 6, 2017

Just to clarify: as far as I can tell, this PR does pass the test cases in #18, disregarding the DNS issues in those cases.

@skeggse
Copy link
Owner

skeggse commented Feb 6, 2017

It does break lab rules. It also uses String#charCodeAt, which doesn't handle the full set of unicode code points. See also String#codePointAt.

@WesTyler
Copy link
Contributor

WesTyler commented Feb 7, 2017

I see your comments in #17, and those aren't covered here, but to play devil's advocate the code already uses charCodeAt in several places. This PR didn't introduce that usage :)

@skeggse
Copy link
Owner

skeggse commented Feb 7, 2017 via email

@WesTyler
Copy link
Contributor

WesTyler commented Feb 7, 2017 via email

@skeggse
Copy link
Owner

skeggse commented Jun 22, 2017

More than a year later, this functionality has landed in 3.0.0. 🎉 Many thanks to @WesTyler for pushing that along!

@skeggse skeggse closed this Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support unicode email addresses
5 participants