<div dir="ltr"><div><div><div>Dot is pretty benign in a file name, isn't it?<br><br></div>POSIX defines the portable file name character set as:<br><br><h3 style="font-family:Arial,Helvetica,sans-serif;color:rgb(0,102,0);font-size:14pt;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">
<a name="tag_03_278">3.278<span class=""> </span></a>Portable Filename Character Set</h3><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
The set of characters from which portable filenames are constructed.</p><pre style="font-size:11pt;font-family:monospace;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px">
<tt>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 . _ -
</tt></pre><br>(<a href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_278">http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_278</a>)<br></div>or<br>(<a href="http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm">http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm</a> and under Base Definitions, section 3 Definitions, and thence to 3.278).<br>
<br></div>Your list omits . <dot> and adds + <plus> (and includes / <slash> the path separator).<br><br class=""><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jun 25, 2014 at 4:37 PM, Arthur David Olson <span dir="ltr"><<a href="mailto:arthurdavidolson@gmail.com" target="_blank">arthurdavidolson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>To help ensure that non-ASCII characters don't appear in distribution filenames,<br></div>changes to zic.c so that the "-v" option warns about them. Both attached and<br>tab-mangled below.<br>
<br></div> --ado<br><br>*** /tmp/,azic.c 2014-06-25 19:32:44.803874900 -0400<br>--- /tmp/,bzic.c 2014-06-25 19:32:44.906880800 -0400<br>***************<br>*** 134,139 ****<br>--- 134,140 ----<br> static int itsdir(const char * name);<br>
static int lowerit(int c);<br> static int mkdirs(char * filename);<br>+ static void namecheck(const char * name);<br> static void newabbr(const char * abbr);<br> static zic_t oadd(zic_t t1, zic_t t2);<br>
static void outzone(const struct zone * zp, int ntzones);<br>***************<br>*** 621,632 ****<br>--- 622,652 ----<br> return (errors == 0) ? EXIT_SUCCESS : EXIT_FAILURE;<br> }<br> <br>+ #define BENIGN "+-_/"<br>
+ <br>+ static void<br>+ namecheck(const char * const name)<br>+ {<br>+ register const char * cp;<br>+ <br>+ if (!noise)<br>+ return;<br>+ for (cp = name; *cp != '\0'; ++cp)<br>+ if (!isascii(*cp) ||<br>
+ (!isalnum(*cp) && strchr(BENIGN, *cp) == NULL)) {<br>+ warning(_("file name %s has non-ASCII-alphanumeric character other than %s"),<br>+ name, BENIGN);<br>+ return;<br>
+ }<br>+ }<br>+ <br> static void<br> dolink(const char *const fromfield, const char *const tofield)<br> {<br> register char * fromname;<br> register char * toname;<br> <br>+ namecheck(tofield);<br>
if (fromfield[0] == '/')<br> fromname = ecpyalloc(fromfield);<br> else {<br>***************<br>*** 1495,1500 ****<br>--- 1515,1521 ----<br> void *typesptr = ats + timecnt;<br> unsigned char *types = typesptr;<br>
<br>+ namecheck(name);<br> /*<br> ** Sort.<br> */<br><br><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jonathan Leffler <<a href="mailto:jonathan.leffler@gmail.com" target="_blank">jonathan.leffler@gmail.com</a>> #include <disclaimer.h><br>Guardian of DBD::Informix - v2013.0521 - <a href="http://dbi.perl.org" target="_blank">http://dbi.perl.org</a><br>
"Blessed are we who can laugh at ourselves, for we shall never cease to be amused."</div>
</div>