Dwie funkcje konwertujące polskie znaki z Windows-1250 na ISO-8859-2 i na odwrót.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
function IsoToWin(S: String): String; var i: Integer; begin for i := 1 to Length(S) do // ISO -> WIN case S of Chr(161): S := Chr(165); Chr(166): S := Chr(140); Chr(172): S := Chr(143); Chr(177): S := Chr(185); Chr(182): S := Chr(156); Chr(188): S := Chr(159); end; Result := S; end; function WinToIso(S: String): String; var i: Integer; begin for i := 1 to Length(S) do // WIN -> ISO case S of Chr(165): S := Chr(161); Chr(140): S := Chr(166); Chr(143): S := Chr(172); Chr(185): S := Chr(177); Chr(156): S := Chr(182); Chr(159): S := Chr(188); end; Result := S; end; |
Autor: Kkkas