nikhil1511 opened a new issue, #1513:
URL: https://github.com/apache/poi/issues/1513
### Description
In `CodePageUtil.codepageToEncoding(int codepage, boolean javaLangFormat)`,
`CP_WINDOWS_1256` (`1256`, Windows Arabic) returns `"Cp1255"` (Hebrew) instead
of `"Cp1256"` when `javaLangFormat` is `true`:
```java
case CP_WINDOWS_1256:
if (javaLangFormat)
return "Cp1255";
else
return "windows-1256";
```
Per [Microsoft code page
identifiers](https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers)
(and POI's own `LocaleID` table), `1255` is Hebrew and `1256` is Arabic.
Because `VBAMacroReader` and HSMF `MAPIMessage` call
`CodePageUtil.codepageToEncoding(codepage, true)`, Arabic VBA projects and MAPI
text with code page `1256` are decoded as Hebrew (`windows-1255`).
### Expected behavior
`CodePageUtil.codepageToEncoding(CodePageUtil.CP_WINDOWS_1256, true)`
returns `"Cp1256"`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]