Adds more encoding conversion support, patch from bug #23446

git-svn-id: trunk@39536 -
This commit is contained in:
sekelsenmat 2012-12-14 11:59:46 +00:00
parent f1d9d42341
commit dac086ca0f

View File

@ -6527,6 +6527,14 @@ begin
Result:=KOI8ToUTF8(s);
Encoded := true;
end
else if AFrom = EncodingUCS2LE then begin
Result := UCS2LEToUTF8(s);
Encoded := true;
end
else if AFrom = EncodingUCS2BE then begin
Result := UCS2BEToUTF8(s);
Encoded := true;
end
else if (AFrom=SysEnc) and Assigned(ConvertAnsiToUTF8) then begin
Result:=ConvertAnsiToUTF8(s);
Encoded := true;
@ -6621,6 +6629,14 @@ begin
Result:=UTF8ToKOI8(Result);
Encoded := true;
end
else if ATo = EncodingUCS2LE then begin
Result := UTF8ToUCS2LE(Result);
Encoded := true;
end
else if ATo = EncodingUCS2BE then begin
Result := UTF8ToUCS2BE(Result);
Encoded := true;
end
else if (ATo=SysEnc) and Assigned(ConvertUTF8ToAnsi) then begin
Result:=ConvertUTF8ToAnsi(Result);
Encoded := true;