LazUtils, LConvEncoding: Fix CP932 (Shift_JIS). Issue #41277, patch by rasberryrabbit.

This commit is contained in:
Juha 2024-12-25 02:18:10 +02:00
parent 5038bb77e1
commit ef08272eb6

View File

@ -40,6 +40,14 @@ begin
Inc(Dest);
end
else
begin
// shift-jis halfwidth
if (CodeP=932) and (c in [#$a0..#$df,#$fd..#$ff]) then
begin
code := Byte(c);
code1:= code;
end
else
begin
code := Byte(c) shl 8;
c:=Src^;
@ -48,6 +56,7 @@ begin
code := code + Byte(c);
code1:=code;
Inc(Src);
end;
code := ArrayUni[SearchTable(ArrayCP, code)];
if code=0 then