mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 14:18:17 +02:00
LazUtils, LConvEncoding: Fix CP932 (Shift_JIS). Issue #41277, patch by rasberryrabbit.
This commit is contained in:
parent
5038bb77e1
commit
ef08272eb6
@ -41,13 +41,22 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
code := Byte(c) shl 8;
|
// shift-jis halfwidth
|
||||||
c:=Src^;
|
if (CodeP=932) and (c in [#$a0..#$df,#$fd..#$ff]) then
|
||||||
Lbyte := byte(Src^);
|
begin
|
||||||
if (c=#0) and (Src-PChar(s)>=len) then break;
|
code := Byte(c);
|
||||||
code := code + Byte(c);
|
code1:= code;
|
||||||
code1:=code;
|
end
|
||||||
Inc(Src);
|
else
|
||||||
|
begin
|
||||||
|
code := Byte(c) shl 8;
|
||||||
|
c:=Src^;
|
||||||
|
Lbyte := byte(Src^);
|
||||||
|
if (c=#0) and (Src-PChar(s)>=len) then break;
|
||||||
|
code := code + Byte(c);
|
||||||
|
code1:=code;
|
||||||
|
Inc(Src);
|
||||||
|
end;
|
||||||
|
|
||||||
code := ArrayUni[SearchTable(ArrayCP, code)];
|
code := ArrayUni[SearchTable(ArrayCP, code)];
|
||||||
if code=0 then
|
if code=0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user