<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mv="http://macVmlSchemaUri" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Title content=""><meta name=Keywords content=""><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Arial;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;
        mso-fareast-language:EN-US;}
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
        {mso-style-priority:99;
        mso-style-link:"Footnote Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;
        mso-fareast-language:EN-US;}
span.MsoFootnoteReference
        {mso-style-priority:99;
        vertical-align:super;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
        {mso-style-priority:1;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:Calibri;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Calibri;
        color:windowtext;}
span.FootnoteTextChar
        {mso-style-name:"Footnote Text Char";
        mso-style-priority:99;
        mso-style-link:"Footnote Text";}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:Calibri;
        mso-fareast-language:EN-US;}
/* Page Definitions */
@page
        {mso-endnote-separator:url("cid:header.htm\@01D2EFF2.26447370") es;
        mso-endnote-continuation-separator:url("cid:header.htm\@01D2EFF2.26447370") ecs;}
@page WordSection1
        {size:595.0pt 842.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body bgcolor=white lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt'><a href="https://docs.google.com/document/d/1i4OAeojY5dj3ZAG8sHcrpSdaG1vN_R011MOuza4djRY/edit?usp=sharing">https://docs.google.com/document/d/1i4OAeojY5dj3ZAG8sHcrpSdaG1vN_R011MOuza4djRY/edit?usp=sharing</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>As part of our efforts to raise awareness, we&#8217;re producing editorials/guest blogs that we&#8217;re getting published in various professional body newsletters and such.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Our third editorial is focusing on Programming Hacks.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Editable copy is available at the link above.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Here&#8217;s the current draft.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Comments please, by the 10<sup>th</sup> of July.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Thanks.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'><span style='font-size:11.0pt'>Don<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><u><span lang=EN-US>Programming language hacks<o:p></o:p></span></u></b></p><p class=MsoNormal><b><u><span lang=EN-US style='font-size:11.0pt'>UA103<o:p></o:p></span></u></b></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Computer programmers are nice people.  They are intelligent.  They are wise.  (Their mothers would say they are good looking </span><span lang=EN-US style='font-size:11.0pt;font-family:Wingdings'>J</span><span lang=EN-US style='font-size:11.0pt'>).  They know that if people have a chance to make a mistake, they will.  So, the wise, intelligent (and good looking) computer programmers build their systems to help prevent mistakes at the source.  Computer programmers are also very efficient (their siblings might say lazy) and will reuse code &#8211; either their own or someone else&#8217;s. For years computer programmers have been putting the same data validation of email addresses and domain names into their code to reduce the amount of Garbage In.  And this now turns out to be a mistake.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>What&#8217;s happened is that while the validation code has been pretty static, email addresses and domain names have been changing quite radically.   <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Since 2001, Top Level Domain Names (TLDs) have been longer than two or three characters.  Since 2010 Top Level Domain names have been available in non-ASCII characters.  And since 2013, the number of TLDs and their frequency of entry into the Root Zone has gone off the charts!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>And today we also have mailbox names (the label to the left of the &#8216;@&#8217;) that can also be in non-ASCII characters!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>So, it&#8217;s time for computer programmers to update their code to accommodate these new domain name options.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>So here are some tips and tricks for computer programmers to use when updating their code:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Input<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Data fields that accept domain names or email addresses should be able to accept ASCII <u>and</u> non-ASCII characters.  UTF-8 is the key here.  This will affect both programs that accept data from a keyboard or other data sources and the database where its stored.   The good news is that most modern databases will have no problems with this.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Validation<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>The easiest way to deal with this is to only use syntactic validation against the specifications in the <a href="https://uasg.tech/wp-content/uploads/2017/06/UA006-Relevant-RFCs.pdf">RFCs</a><a style='mso-footnote-id:ftn1' href="#_ftn1" name="_ftnref1" title=""><sup><sup><span lang=EN-US style='font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US'>[1]</span></sup></sup></a>.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>There are other ways of making sure the data entered is what the user meant, such as requiring entry of the field twice and doing a compare.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>If you need to validate further, use a DNS lookup &#8211; that&#8217;s the most certain.   Or if you&#8217;re going to use a local table, make sure that it&#8217;s from an authoritative source and that it&#8217;s updated at least daily.  <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Storage<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>The easiest way to deal with storage is to support UTF-8.   But for applications that can&#8217;t, there is an algorithm (Punycode)<a style='mso-footnote-id:ftn2' href="#_ftn2" name="_ftnref2" title=""><sup><sup><span lang=EN-US style='font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US'>[2]</span></sup></sup></a> that allows transformation of domain names between ASCII and non-ASCII strings. NB: the Punycode conversion may NOT work for the mailbox name in an email address.  Alternative encoding schemes exist and should be applied.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Processing<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>There are times when two different representations of a domain name are not the same but are equivalent.  For example, when a non-ASCII domain name has been converted using the Punycode algorithm.  When processing or sorting, it&#8217;s important that they are treated as equivalent.   This will require some policies for the application or indeed the organization as to how domain names and email addresses are being dealt with.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Display<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Because domain names in non-ASCII characters (and mailbox names too) are growing more popular, you&#8217;ll need to make sure that you&#8217;re able to display them in a way that works for your community.   Public facing applications should certainly display in native scripts and not an ASCII resulting from a Punycode transformation.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Check Libraries<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>A growing number of libraries, particularly Open Source Programming Language Libraries, will be correcting their validation routines, so being able to be UA Ready may be as simple as recompiling the code using the latest versions of the library.   The UASG is encouraging remediation work in quite a number of libraries.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Github and SourceForge are also two good places to look to find working code.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>The UASG also publishes some good reference material at <a href="http://www.uasg.tech/documents">www.uasg.tech/documents</a>.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Most efforts to get applications UA Ready will fall into the &#8216;Bug Fix&#8217; level of effort.  It&#8217;s time to get applications up to scratch.   <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p></div><div style='mso-element:footnote-list'><br clear=all><hr align=left size=1 width="33%"><div style='mso-element:footnote' id=ftn1><p class=MsoFootnoteText><a style='mso-footnote-id:ftn1' href="#_ftnref1" name="_ftn1" title=""><span class=MsoFootnoteReference><span lang=EN-US><span class=MsoFootnoteReference><span lang=EN-US style='font-size:12.0pt;font-family:Calibri;mso-fareast-language:EN-US'>[1]</span></span></span></span></a><span lang=EN-US> https://uasg.tech/wp-content/uploads/2017/06/UA006-Relevant-RFCs.pdf<o:p></o:p></span></p></div><div style='mso-element:footnote' id=ftn2><p class=MsoFootnoteText><a style='mso-footnote-id:ftn2' href="#_ftnref2" name="_ftn2" title=""><span class=MsoFootnoteReference><span lang=EN-US><span class=MsoFootnoteReference><span lang=EN-US style='font-size:12.0pt;font-family:Calibri;mso-fareast-language:EN-US'>[2]</span></span></span></span></a><span lang=EN-US> https://www.ietf.org/rfc/rfc3492.txt<o:p></o:p></span></p></div></div></body></html>