You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IDN and EAI are very complicated to handle properly. In keeping with the spirit of the API, jsmime should shield clients from the complexity to the maximum extent possible (this ought to include APIs that indicate whether or not two APIs are equivalent, for example).
The hard part here is getting reliable APIs for normalization and IDNA: String.prototype.normalize is added in ES6 (but as yet unimplemented in any engine), and there is no JS library that satisfies IDNA2003, IDNA2008, or IDNA-as-used-in-the-browser requirements. The URL specification has aspirations to include IDN helper functions, but API design here is blocked on getting some fixes in UTS#46.
The text was updated successfully, but these errors were encountered:
What a coincidence, I was just working my way through this right now. :-)
I was planning on using String.prototype.normalize to handle normalization where necessary (it appears to have landed in both v8 and SpiderMonkey in the past month or so) and relying on polyfills for older browsers there.
IDN handling is much more complicated, since I need to think through the best way to mitigate Unicode homograph attacks, persistent storage issues, and IDNA2003/IDNA2008/UTS#46 mismatches.
IDN and EAI are very complicated to handle properly. In keeping with the spirit of the API, jsmime should shield clients from the complexity to the maximum extent possible (this ought to include APIs that indicate whether or not two APIs are equivalent, for example).
The hard part here is getting reliable APIs for normalization and IDNA: String.prototype.normalize is added in ES6 (but as yet unimplemented in any engine), and there is no JS library that satisfies IDNA2003, IDNA2008, or IDNA-as-used-in-the-browser requirements. The URL specification has aspirations to include IDN helper functions, but API design here is blocked on getting some fixes in UTS#46.
The text was updated successfully, but these errors were encountered: