Jacob Havkrog
2007-11-09 13:11:04 UTC
I've moved my source code from Delphi 5 to Delphi 2007.
At first, things were ok. Yesterday, I had a converion function like this:
function Tcsv.ConvertDanish(Text: string): string;
var
Count: Integer;
begin
for Count := 1 to Length(Text) do begin
case Text[count] of
#130: Text[count] := 'é';
#138: Text[count] := 'è';
#144: Text[count] := 'É';
#132: Text[count] := 'ä';
#133: Text[count] := 'à';
#160: Text[count] := 'á';
#142: Text[count] := 'Ä';
#148: Text[count] := 'ö';
#129: Text[count] := 'ü';
#149: Text[count] := 'ò';
#162: Text[count] := 'ó';
#153: Text[count] := 'Ö';
#154: Text[count] := 'Ü';
#134: Text[count] := 'å';
#143: Text[count] := 'Å';
#145: Text[count] := 'æ';
#146: Text[count] := 'Æ';
#155: Text[count] := 'ø';
#157: Text[count] := 'Ø';
end;
end;
Result := Text;
end;
Today, it suddenly looks like this, and it wont compile...
function Tcsv.ConvertDanish(Text: string): string;
var
Count: Integer;
begin
for Count := 1 to Length(Text) do begin
case Text[count] of
#130: Text[count] := 'é';
#138: Text[count] := 'Ú';
#144: Text[count] := 'Ã?';
#132: Text[count] := 'À';
#133: Text[count] := 'Ã ';
#160: Text[count] := 'á';
#142: Text[count] := 'Ã"';
#148: Text[count] := 'ö';
#129: Text[count] := 'Ì';
#149: Text[count] := 'ò';
#162: Text[count] := 'ó';
#153: Text[count] := 'Ã-';
#154: Text[count] := 'Ão';
#134: Text[count] := 'Ã¥';
#143: Text[count] := 'Ã.';
#145: Text[count] := 'Ê';
#146: Text[count] := 'Ã?';
#155: Text[count] := 'ø';
#157: Text[count] := 'Ã~';
end;
end;
Result := Text;
end;
Whats going on??
Jacob
At first, things were ok. Yesterday, I had a converion function like this:
function Tcsv.ConvertDanish(Text: string): string;
var
Count: Integer;
begin
for Count := 1 to Length(Text) do begin
case Text[count] of
#130: Text[count] := 'é';
#138: Text[count] := 'è';
#144: Text[count] := 'É';
#132: Text[count] := 'ä';
#133: Text[count] := 'à';
#160: Text[count] := 'á';
#142: Text[count] := 'Ä';
#148: Text[count] := 'ö';
#129: Text[count] := 'ü';
#149: Text[count] := 'ò';
#162: Text[count] := 'ó';
#153: Text[count] := 'Ö';
#154: Text[count] := 'Ü';
#134: Text[count] := 'å';
#143: Text[count] := 'Å';
#145: Text[count] := 'æ';
#146: Text[count] := 'Æ';
#155: Text[count] := 'ø';
#157: Text[count] := 'Ø';
end;
end;
Result := Text;
end;
Today, it suddenly looks like this, and it wont compile...
function Tcsv.ConvertDanish(Text: string): string;
var
Count: Integer;
begin
for Count := 1 to Length(Text) do begin
case Text[count] of
#130: Text[count] := 'é';
#138: Text[count] := 'Ú';
#144: Text[count] := 'Ã?';
#132: Text[count] := 'À';
#133: Text[count] := 'Ã ';
#160: Text[count] := 'á';
#142: Text[count] := 'Ã"';
#148: Text[count] := 'ö';
#129: Text[count] := 'Ì';
#149: Text[count] := 'ò';
#162: Text[count] := 'ó';
#153: Text[count] := 'Ã-';
#154: Text[count] := 'Ão';
#134: Text[count] := 'Ã¥';
#143: Text[count] := 'Ã.';
#145: Text[count] := 'Ê';
#146: Text[count] := 'Ã?';
#155: Text[count] := 'ø';
#157: Text[count] := 'Ã~';
end;
end;
Result := Text;
end;
Whats going on??
Jacob