<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="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>This one was resolved, sort of. The function is working correctly. The path being sent to the function had a folder with a + character in it. Well it should have, but the + character had been replaced with a space character.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>The path is coming from a PHP script on a web server sending to my app via Indy10 TCPServer. Something is causing the + character to be replaced, either in the PHP script or Indy. Some more investigation required.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Ross Levis [mailto:ross@stationplaylist.com] <br><b>Sent:</b> Tuesday, 26 February 2013 7:00 p.m.<br><b>To:</b> 'NZ Borland Developers Group - Delphi List'<br><b>Subject:</b> FindFirstFileW and UNC paths<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>I’m having a problem getting this function to work with UNC paths.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>var Name: WideString;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>Handle := FindFirstFileW(PWideChar(Name), FindData);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>I’ve tried <a href="file:///\\%3f\computer\share\folder\*">\\?\computer\share\folder\*</a> and <a href="file:///\\%3f\UNC\computer\">\\?\UNC\computer\</a>... which I’ve seen while investigating but that doesn’t work either. It works fine for drive letters.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>This is part of a WideFileExists function I’m using in D7. I have another question where I need to detect if the path is UNC and if so, remove the first “\”. I’m not sure what D7 does with the copy function. Can I do<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>Name := WideString(‘\\?’)+copy(Name,2,MaxWord) ?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>Ross.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a> [<a href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>] <b>On Behalf Of </b>Stefan Mueller<br><b>Sent:</b> Tuesday, 26 February 2013 6:30 p.m.<br><b>To:</b> 'NZ Borland Developers Group - Delphi List'<br><b>Subject:</b> Re: [DUG] Translate diacritic characters to ASCII<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Just convert it to US-ASCII, all diacritics will be normalized (and other characters like japanese will turn to “?”).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>procedure TFrameScript.BitBtn1Click(Sender: TObject);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>var sw : string;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> sr : RawByteString;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>begin<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> sw := 'swe:ÀÁÂÃÄÅ - jap:</span><span lang=JA style='font-family:"MS Mincho";color:#222222;background:white'>日</span><span lang=JA style='font-family:"MS Gothic";color:#222222;background:white'>本 </span><span lang=EN-US style='color:#1F497D'>- ger:üöä';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> sr := sw;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> SetCodePage(sr, 20127, true);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> BitBtn1.caption := sr;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>end;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:navy'><br></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Kind Regards,<br>Stefan Mueller</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#585757'> <br></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#666699'>_______________________<br>R&D Manager<br>ORCL Toolbox LLP, Japan<br></span><span lang=EN-US style='color:#1F497D'><a href="http://www.orcl-toolbox.com/" title="blocked::http://www.orcl-toolbox.com/"><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>http://www.orcl-toolbox.com</span></a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p></div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a> [<a href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>] <b>On Behalf Of </b>Ross Levis<br><b>Sent:</b> Tuesday, February 26, 2013 1:29 PM<br><b>To:</b> 'NZ Borland Developers Group - Delphi List'<br><b>Subject:</b> [DUG] Translate diacritic characters to ASCII<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>Anyone know if there is a windows function or method to convert diacritic characters to their similar ASCII counterpart, such as all of these get translated to “A”: ÀÁÂÃÄÅ<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>Cheers.<o:p></o:p></span></p></div></body></html>