Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi UTF8ToAnsi (gemodded) und ANSI/UTF8 gemischt (https://www.delphipraxis.net/43533-utf8toansi-gemodded-und-ansi-utf8-gemischt.html)

sECuRE 8. Apr 2005 02:43

Re: UTF8ToAnsi (gemodded) und ANSI/UTF8 gemischt
 
Hi,

die Funktion bricht leider nicht mit einer Exception ab, stattdessen nutze ich nun folgenden Code zum Überprüfen:
Delphi-Quellcode:
function ConvertString(SIn:string):string;
var SConverted:=string;
begin
SConverted:=UTF8ToAnsi(SIn);
if (length(SConverted) = 0) then
  SConverted:=SIn;
result:=SConverted;
end;
Danke für den Denkanstoss.

cu


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:36 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz