diff --git a/.gitattributes b/.gitattributes index 18bc0117d5..c391a32c3a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/lcl/alllclunits.pp b/lcl/alllclunits.pp index 91459a2996..ffec87640e 100644 --- a/lcl/alllclunits.pp +++ b/lcl/alllclunits.pp @@ -64,7 +64,7 @@ uses WSProc, WSDesigner, // Other units - DefaultTranslator, utf8wstring; + DefaultTranslator; implementation diff --git a/lcl/interfacebase.pp b/lcl/interfacebase.pp index bb876166d3..4451f851ea 100644 --- a/lcl/interfacebase.pp +++ b/lcl/interfacebase.pp @@ -33,9 +33,6 @@ interface {$endif} uses -{$ifdef UseUTF8WString} - utf8wstring, -{$endif} Types, Classes, SysUtils, Math, LCLStrConsts, LCLType, LCLProc, LMessages, GraphType, GraphMath, Themes; diff --git a/lcl/utf8wstring.pas b/lcl/utf8wstring.pas deleted file mode 100644 index 8a39a8c715..0000000000 --- a/lcl/utf8wstring.pas +++ /dev/null @@ -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. -