I’m having a problem getting this function to work with UNC paths.

 

var Name: WideString;

…

Handle := FindFirstFileW(PWideChar(Name), FindData);

 

I’ve tried \\?\computer\share\folder\*  and \\?\UNC\computer\... which I’ve 
seen while investigating but that doesn’t work either.  It works fine for drive 
letters.

 

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

Name := WideString(‘\\?’)+copy(Name,2,MaxWord)  ?

 

Cheers,

Ross.

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of Stefan Mueller
Sent: Tuesday, 26 February 2013 6:30 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Translate diacritic characters to ASCII

 

Just convert it to US-ASCII, all diacritics will be normalized (and other 
characters like japanese will turn to “?”).

 

procedure TFrameScript.BitBtn1Click(Sender: TObject);

var sw : string;

    sr : RawByteString;

begin

    sw := 'swe:ÀÁÂÃÄÅ - jap:日本 - ger:üöä';

    sr := sw;

    SetCodePage(sr, 20127, true);

    BitBtn1.caption := sr;

end;

 

 


Kind Regards,
Stefan Mueller 
_______________________
R&D Manager
ORCL Toolbox LLP, Japan
 <http://www.orcl-toolbox.com/> http://www.orcl-toolbox.com

 

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of Ross Levis
Sent: Tuesday, February 26, 2013 1:29 PM
To: 'NZ Borland Developers Group - Delphi List'
Subject: [DUG] Translate diacritic characters to ASCII

 

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”: ÀÁÂÃÄÅ

 

Cheers.

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe

Reply via email to