Removed the utf-8 widestring managed.

git-svn-id: trunk@13333 -
This commit is contained in:
sekelsenmat 2007-12-14 19:01:52 +00:00
parent d3bf174d13
commit 9ddb7d42d5
4 changed files with 1 additions and 67 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -64,7 +64,7 @@ uses
WSProc,
WSDesigner,
// Other units
DefaultTranslator, utf8wstring;
DefaultTranslator;
implementation

View File

@ -33,9 +33,6 @@ interface
{$endif}
uses
{$ifdef UseUTF8WString}
utf8wstring,
{$endif}
Types, Classes, SysUtils, Math, LCLStrConsts, LCLType, LCLProc, LMessages,
GraphType, GraphMath, Themes;

View File

@ -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.