Thema: Delphi Unicode search

Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu
Online

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

Re: Unicode search

  Alt 31. Mai 2007, 17: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)
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat