diff --git a/components/lazutils/asiancodepagefunctions.inc b/components/lazutils/asiancodepagefunctions.inc index 7ff8609f4f..85723891bc 100644 --- a/components/lazutils/asiancodepagefunctions.inc +++ b/components/lazutils/asiancodepagefunctions.inc @@ -41,13 +41,22 @@ begin end 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); + // 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^; + 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)]; if code=0 then