Recent

Author Topic: TMemo.Lines.Strings[i] bug with unicode (utf8) character  (Read 5380 times)

Slawek

  • New member
  • *
  • Posts: 9
TMemo.Lines.Strings[i] bug with unicode (utf8) character
« on: January 12, 2008, 01:16:32 pm »
Hi,

If file utf8.txt contains text with utf8 characters (i.e. polish national
characters),  then Memo1.Lines.Strings returns wrong value.

Code: [Select]
var  str: String;
        i: Integer;
begin
  Memo1.Clear;
  Memo2.Clear;
  Memo1.Lines.LoadFromFile('utf8.txt');
  for i:=0 to Memo1.Lines.Count-1 do begin
    str := Memo1.Lines.Strings[i];   //wrong value
    Memo2.Lines.Add(str);
  end;
end;


Slawek

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: TMemo.Lines.Strings[i] bug with unicode (utf8) character
« Reply #1 on: January 12, 2008, 01:27:43 pm »
On Windows TMemo is a common control, a control provided by Windows.

Slawek

  • New member
  • *
  • Posts: 9
RE: TMemo.Lines.Strings[i] bug with unicode (utf8) character
« Reply #2 on: January 12, 2008, 02:01:48 pm »
I use Linux system. Fedora 8.
Lazarus 0.9.25 beta, SVN Revision: 13579

 

TinyPortal © 2005-2018