<div dir="ltr">Thankyou very much indeed.<div>I have an old PmWiki install (no doubt using an 8-bit character set), so I have not dared to change to UTF 8 (I had looked at 

<a href="https://pmwiki.org/wiki/PmWiki/UTF-8">https://pmwiki.org/wiki/PmWiki/UTF-8</a> ). </div><div><br></div><div>I've set   $Charset = "ISO-8859-4"; and added the range \\xd2\\xf2 to no effect, so I'll do more work.</div><div><br></div><div>It looks like I have some research and work to do.</div><div>The files live on my own (windows) server so I know the server supports these characters in filenames.</div><div>The reason is that characters with macrons are part of Māori - an official NZ language, so I want to support it. </div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>cheers and thanks again</div><div><br></div><div>Simon</div><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 29 Jul 2019 at 21:47, Petko Yotov <<a href="mailto:5ko@5ko.fr">5ko@5ko.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 29/07/2019 10:38, Simon wrote:<br>
> <a href="https://pmwiki.org/wiki/PmWiki/UploadVariables#UploadNameChars" rel="noreferrer" target="_blank">https://pmwiki.org/wiki/PmWiki/UploadVariables#UploadNameChars</a><br>
> From the page<br>
> The set of characters allowed in upload names. Defaults to "-\w. ", <br>
> which<br>
> means alphanumerics, hyphens, underscores, dots, and spaces can be used <br>
> in<br>
> upload names, and everything else will be stripped.<br>
> $UploadNameChars = "-\\w. !"; # allow dash, letters, digits, dots, <br>
> spaces and exclamations<br>
> $UploadNameChars = "-\\w. \\x80-\\xff"; # allow Unicode<br>
> Isn't \\x80-\\xff  just extended ASCII?<br>
<br>
If the charset/encoding of your wiki is ISO-8859-1/Latin-1/Windows-1252 <br>
or another 8-bit encoding, \x80-\xff are the characters in the code page <br>
between 128 and 255, see <br>
<a href="https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Code_page_layout" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Code_page_layout</a><br>
<br>
If you have enabled UTF-8 (variable-length, 8-32 bits/character) for <br>
your wiki, it is a different code page, with characters \x20-\x7f are <br>
the same as in most 8-bit code pages (ASCII) and the others are 2, 3 or <br>
4 bytes for one character but all come from the \x80-\xff range.<br>
<br>
<br>
> I'm trying to do this with no effect<br>
> <br>
>   $UploadNameChars = "-\\w. !=\\+#\\x{014C}\\x{014D}"; # allow<br>
> exclamations, equals, plus, and hash Ōō<br>
<br>
Exclamations, equals, plus, and hash is strongly recommended to NOT <br>
enable because these characters have different meanings in URL <br>
addresses, and in PmWiki.<br>
<br>
The exclamation sign is a stop-mark for a link, a hash signifies <br>
internal anchor or ajax subpage, plus is the standard encoding of <br>
spaces, and equals start values of URL parameters.<br>
<br>
If you do enable these, many other things may and will break, and we <br>
currently don't have the potential to support such configurations.<br>
<br>
There is no such thing as \x{014C}, in the UTF-8 encoding these are the <br>
2 bytes \xc5 and \x8c and in your range you would write these <br>
\\xc5\\x8c. The small letter would be \\xc5\\x8d so the range would look <br>
like \\xc5\\x8c\\x8d (no need to repeat \\xc5). If it is not the UTF-8 <br>
encoding, it depends if the current code page contains this character, <br>
for example the iso8859-4 code page contains these Ōō characters at <br>
single bytes \xd2 and \xf2:<br>
<br>
   <a href="https://en.wikipedia.org/wiki/ISO/IEC_8859-4" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/ISO/IEC_8859-4</a><br>
<br>
so if your wiki is in iso8859-4 then you could add the range \\xd2\\xf2. <br>
Enabling this could be as easy as adding to config.php<br>
<br>
   $Charset = "ISO-8859-4";<br>
<br>
but your local configuration files, if they contain the international <br>
characters, need to be saved in the same encoding, see:<br>
<br>
   <a href="https://www.pmwiki.org/wiki/PmWiki/LocalCustomizations#encoding" rel="noreferrer" target="_blank">https://www.pmwiki.org/wiki/PmWiki/LocalCustomizations#encoding</a><br>
<br>
If the international characters are not in the code page of the wiki, <br>
they cannot be enabled, browsers cannot post such files correctly. The 2 <br>
characters are not in the Latin-1/iso8859-1 code page.<br>
<br>
If this is a vital requirement for file names, you may try enabling <br>
UTF-8 for your wiki, then browsers will be able to both post files and <br>
pages (wikitext, pagenames, categories) with the international <br>
characters without transforming these to HTML entities.<br>
<br>
However, moving a wiki to UTF-8 is not easy if you already have uploaded <br>
files with international characters, or pagenames with these, and you <br>
may have some difficulties if the file system of the server is not <br>
Unicode.<br>
<br>
Or, you could try enabling some 8-bit encoding which does contain these <br>
characters, but again, if it is not the same as the encoding on your <br>
file system, using a file/ftp browser may not show the correct <br>
characters, and a file uploaded via FTP with such characters in the name <br>
may not be visible on the wiki.<br>
<br>
If it is not a fatally important requirement to have these characters in <br>
the filenames on the server, but you are annoyed when people upload <br>
files which appear with broken names, I can suggest a custom <br>
$MakeUploadNamePatterns array that will replace Ōō with Oo in the file <br>
name (not the text inside the file) when a file is uploaded. Enabling <br>
this will probably break existing links in the wiki to already uploaded <br>
files with these characters, and these may need to be renamed.<br>
<br>
There is no easy solution unfortunately.<br>
<br>
Petko<br>
<br>
_______________________________________________<br>
pmwiki-devel mailing list<br>
<a href="mailto:pmwiki-devel@pmichaud.com" target="_blank">pmwiki-devel@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-devel" rel="noreferrer" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-devel</a><br>
</blockquote></div>