Thema: Delphi Unicode search

Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.184 Beiträge
 
Delphi 12 Athens
 
#7

Re: Unicode search

  Alt 31. Mai 2007, 18:04
UTF-8 is a transcodet format that constains Unicode-Data.
Unicode has 2 bytes per char.


I already found a mistake with myself:
Code:
[color=#0000ff]{ read a buffer }[/color]
SetLength(Buf, i + [color=#ff0000](bytesToRead div 2)[/color]);
but:
Zitat:
{ open file as binary, 1 byte recordsize }
However, there the file not binary, but in WideChar steps is processed, the statement was not right.


[add]
I re-worked the function/demo and still a UTF8 version with inserted.
Angehängte Dateien
Dateityp: zip unicodesearch_917.zip (193,8 KB, 25x aufgerufen)
$2B or not $2B
  Mit Zitat antworten Zitat