mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:36:01 +02:00
Removed the utf-8 widestring managed.
git-svn-id: trunk@13333 -
This commit is contained in:
parent
d3bf174d13
commit
9ddb7d42d5
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3272,7 +3272,6 @@ lcl/themes.pas svneol=native#text/pascal
|
||||
lcl/tmschema.pas svneol=native#text/pascal
|
||||
lcl/toolwin.pp svneol=native#text/pascal
|
||||
lcl/translations.pas svneol=native#text/pascal
|
||||
lcl/utf8wstring.pas -text
|
||||
lcl/utrace.pp svneol=native#text/pascal
|
||||
lcl/widgetset/README.txt svneol=native#text/plain
|
||||
lcl/widgetset/wsactnlist.pp svneol=native#text/pascal
|
||||
|
@ -64,7 +64,7 @@ uses
|
||||
WSProc,
|
||||
WSDesigner,
|
||||
// Other units
|
||||
DefaultTranslator, utf8wstring;
|
||||
DefaultTranslator;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -33,9 +33,6 @@ interface
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
{$ifdef UseUTF8WString}
|
||||
utf8wstring,
|
||||
{$endif}
|
||||
Types, Classes, SysUtils, Math, LCLStrConsts, LCLType, LCLProc, LMessages,
|
||||
GraphType, GraphMath, Themes;
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
{
|
||||
/***************************************************************************
|
||||
utf8wstring.pas
|
||||
-----------
|
||||
UTF-8 Widestring manager
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
Ensures that we have a reliable encoding for ansistrings (UTF-8 Encoding),
|
||||
until a new type for utf-8 strings is created.
|
||||
}
|
||||
unit utf8wstring;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
procedure UTF8Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
|
||||
procedure UTF8Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
|
||||
|
||||
implementation
|
||||
|
||||
procedure UTF8Wide2AnsiMove(source: pwidechar; var dest: ansistring; len: SizeInt);
|
||||
var
|
||||
Buffer: WideString;
|
||||
begin
|
||||
Buffer := Copy(source, 1, len);
|
||||
dest := UTF8Encode(Buffer);
|
||||
end;
|
||||
|
||||
procedure UTF8Ansi2WideMove(source: pchar; var dest: widestring; len: SizeInt);
|
||||
var
|
||||
Buffer: ansistring;
|
||||
begin
|
||||
Buffer := Copy(source, 1, len);
|
||||
dest := UTF8Decode(Buffer);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Widestringmanager.Wide2AnsiMoveProc := @UTF8Wide2AnsiMove;
|
||||
Widestringmanager.Ansi2WideMoveProc := @UTF8Ansi2WideMove;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user