[fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

Michael Van Canneyt michael at freepascal.org
Sun Nov 19 12:59:17 CET 2023



On Sun, 19 Nov 2023, Sven Barth via fpc-pascal wrote:

> Bart via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am Sa., 18.
> Nov. 2023, 18:24:
>
>> 1. The docs state that an exception is raised if the given paths
>> contain invalid characters. Does the vlaue of the ValidateParams have
>> any influence on this?
>>
>
> Also: does this depend on the operating system and/or file system? Cause
> Linux file systems have different invalid characters (usually only slash
> and NUL) than NTFS or FAT.

Attached program tests for invalid characters. if ValidateParams is
False, no tests are done on input.

The output is in linux.txt and windows.txt

>From what I can see all characters with ascii code < 32 are invalid.
For windows additionally, the > " < and | characters are invalid.

This is for paths only. I didn't test filename characters.

Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tpath-test.zip
Type: application/zip
Size: 5156 bytes
Desc: 
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20231119/0b1e6128/attachment.zip>


More information about the fpc-pascal mailing list