[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'FileUtil' (#lazutils)

ExtractShortPathNameUTF8

Gets a short path name using the 8.3 notation from the UTF-8-encoded value.

Declaration

Source position: fileutil.pas line 57

function ExtractShortPathNameUTF8(

  const FileName: string

):string;

Arguments

FileName

  

Path name examined in the routine.

Function result

Path name using the familiar 8.3 notation.

Description

ExtractShortPathNameUTF8 is a String function used to get a short path name from the UTF-8-encoded value in FileName. Short path names use the familiar 8.3 notation, where the file name contains a maximum of 8 characters, and the optional file extension has a maximum of 3 characters.

ExtractShortPathNameUTF8 is similar to the ExtractShortPathName routine in the RTL sysutils unit, but accepts a String value in FileName and returns a String value in the result which uses UTF-8 encoding.The RTL routine uses UnicodeString for both.

The WinCE platform does not support the concept of short file names; the return value is set to the value in FileName.

For Windows platforms after version 5, the GetShortPathNameW routine is called to get the shortened path name.The UTF-16 value is converted to UTF-8 for use in the return value.

For all other platforms, FileName is converted to the system encoding and the ExtractShortPathName routine in the RTL is used to shorten the path name. The value is converted to UTF-8 for use in the return value.

See also

ExtractShortPathName


Version 3.2 Generated 2024-02-25 Home