ExtractShortPathNameUTF8 function
Gets a short path name using the 8.3 notation from the UTF-8-encoded value.
Declaration
function ExtractShortPathNameUTF8(const FileName: string): stringDescription
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
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
