diff options
-rw-r--r-- | lowlevelunit.pas | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas index 3472049..3977484 100644 --- a/lowlevelunit.pas +++ b/lowlevelunit.pas @@ -94,6 +94,7 @@ function mirrorBits(b: byte): byte; overload; function zusammenfassen(s1,s2: string): string; function intervallAusrollen(s: string): string; +function myUtf8Encode(s: string): string; var base64Chars: array[0..63] of char; @@ -832,6 +833,19 @@ begin result:=trim(result); end; +function myUtf8Encode(s: string): string; +const + falsch: string = #$c4#$d6#$dc#$df#$e4#$f6#$fc; + richtig: array[1..7] of string = ('Ä','Ö','Ü','ß','ä','ö','ü'); +var + i: longint; +begin + result:=s; + for i:=1 to length(richtig) do + while pos(falsch[i],result)>0 do + result:=leftStr(result,pos(falsch[i],result)-1)+richtig[i]+rightStr(result,length(result)-pos(falsch[i],result)); +end; + var b: byte; begin |