mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-30 07:02:33 +02:00
- Removed Win32Wide2AnsiMove() again, it was removed already in r17202 but got restored during subsequent cpstrnew merging.
git-svn-id: trunk@19781 -
This commit is contained in:
parent
28c27c409e
commit
76b9d7e766
@ -516,23 +516,6 @@ function Win32UnicodeLower(const s : UnicodeString) : UnicodeString;
|
||||
Widestring
|
||||
******************************************************************************}
|
||||
|
||||
procedure Win32Wide2AnsiMove(source:pwidechar;var dest:RawByteString;cp : TSystemCodePage;len:SizeInt);
|
||||
var
|
||||
destlen: SizeInt;
|
||||
begin
|
||||
// retrieve length including trailing #0
|
||||
// not anymore, because this must also be usable for single characters
|
||||
destlen:=WideCharToMultiByte(cp, 0, source, len, nil, 0, nil, nil);
|
||||
// this will null-terminate
|
||||
setlength(dest, destlen);
|
||||
if destlen>0 then
|
||||
begin
|
||||
WideCharToMultiByte(cp, 0, source, len, @dest[1], destlen, nil, nil);
|
||||
PAnsiRec(pointer(dest)-AnsiFirstOff)^.CodePage:=cp;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure Win32Ansi2WideMove(source:pchar;cp : TSystemCodePage;var dest:widestring;len:SizeInt);
|
||||
var
|
||||
destlen: SizeInt;
|
||||
|
Loading…
Reference in New Issue
Block a user