Delphi-PRAXiS
Seite 1 von 4  1 23     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Unicode Compiler Option (https://www.delphipraxis.net/117371-unicode-compiler-option.html)

EWeiss 16. Jul 2008 23:47


Unicode Compiler Option
 
Kleine Frage

Muss man in den Optionen vom Copiler etwas einstellen
oder irgendwelche Define im code eintragen damit Unicode auch auf verschiedenen Systemen(Sprachen) funktioniert ?

Hab da jemand in Korea sitzen wenn ich ihm meine DLL schicke funktioniert
Unicode nicht. Nur dann wenn er es selbst compiliert aud seinen System.

gruss Emil

mkinzler 17. Jul 2008 00:07

Re: Unicode Compiler Option
 
Delphi wird erst mit der demnächst erscheinenden Delphi-Version ohne Fremdkomponenten unicodefähig

EWeiss 17. Jul 2008 00:10

Re: Unicode Compiler Option
 
Zitat:

Zitat von mkinzler
Delphi wird erst mit der demnächst erscheinenden Delphi-Version ohne Fremdkomponenten unicodefähig

Ok dann hat sich das erledigt

Danke schön.

gruss Emil

mkinzler 17. Jul 2008 00:17

Re: Unicode Compiler Option
 
Die letzte OpenSource-Version der TNT-Unicode-Komponentensammlung lässt sich noch finden
http://www.mh-nexus.de/tntunicodecontrols.htm

EWeiss 17. Jul 2008 00:26

Re: Unicode Compiler Option
 
Zitat:

Zitat von mkinzler
Die letzte OpenSource-Version der TNT-Unicode-Komponentensammlung lässt sich noch finden
http://www.mh-nexus.de/tntunicodecontrols.htm

hab mir da was gebastelt von irgendeinen C++ code

Delphi-Quellcode:
function EncodeUTF8(const Source: WideString): string;
var
  Index, SourceLength, CChar: Cardinal;
begin
  { Convert unicode to UTF-8 }
  Result := '';
  Index := 0;
  SourceLength := Length(Source);
  while Index < SourceLength do
  begin
    Inc(Index);
    CChar := Cardinal(Source[Index]);
    if CChar <= $7F then
      Result := Result + Source[Index]
    else if CChar > $7FF then
    begin
      Result := Result + Char($E0 or (CChar shr 12));
      Result := Result + Char($80 or ((CChar shr 6) and $3F));
      Result := Result + Char($80 or (CChar and $3F));
    end
    else
    begin
      Result := Result + Char($C0 or (CChar shr 6));
      Result := Result + Char($80 or (CChar and $3F));
    end;
  end;
end;



function ToUnicodeString(s: pchar): WideString;
var
   pw1 : array[0..1024] of WideChar;
   nLen1, nLen2, nLen3 : integer;
begin
   nLen1 := Length(s);
   nLen2 := length(pw1);
   nLen3 := MultiByteToWideChar(CP_OEMCP, MB_PRECOMPOSED, s, nLen1, @pw1[0], nLen2);
   if nLen3 > 0 then
   begin
      pw1[nLen3] := chr(0); // *** We should put chr(0) at the end of string
      Result := WideString(pw1);
   end else
      Result := '';
end;



function StrToUTF8(s: pchar): string;
var
   w_str : WideString;
begin
   w_str := ToUnicodeString(s);
   if w_str <> '' then
      result := EncodeUTF8(w_str)
   else
      result := '';
end;
Das funktioniert ohne problem
Aber nur wenn es auf dem jeweiligen System compiliert wird.
Was ist an der Komponente anders ?

gruss Emil

mkinzler 17. Jul 2008 00:28

Re: Unicode Compiler Option
 
Es ist keine einzelne Komponente sondern eine Sammlung von vielen Standardkomponenten.

EWeiss 17. Jul 2008 00:30

Re: Unicode Compiler Option
 
Zitat:

Zitat von mkinzler
Es ist keine einzelne Komponente sondern eine Sammlung von vielen Standardkomponenten.

wäre nicht schlecht nur für ein Freeware projekt Geld ausgeben
Soweit gehe ich dann doch nicht.

trotzdem Danke für den Hinweis.

Gruss Emil

mkinzler 17. Jul 2008 00:32

Re: Unicode Compiler Option
 
Warum, diese Version ist doch frei

EWeiss 17. Jul 2008 00:36

Re: Unicode Compiler Option
 
Zitat:

Zitat von mkinzler
Warum, diese Version ist doch frei

ich lese das was von preisen
Zitat:

"TMS Unicode Component Pack" with pricing at 30EU for a single developer license and 120EU for a
gruss Emil

mkinzler 17. Jul 2008 00:38

Re: Unicode Compiler Option
 
Ja, aber bis zur Version 2.3.0 war die Sammlung OpenSource
http://www.yunqa.de/delphi/doku.php/...controls/index


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:21 Uhr.
Seite 1 von 4  1 23     Letzte »    

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