You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WingDings font gives "iconv(): Detected an incomplete multibyte character in input string" #96
iconv(): Detected an incomplete multibyte character in input string at /.../public_html/vendor/henck/rtf-to-html/src/Html/HtmlFormatter.php:375
Analysis
On the first line "{\f1\fswiss\fcharset128 Wingdings;}" the WingDings font is defined with fcharset 128.
fcharset 128 is the Japanese Shift-JIS multibyte font. When the first character has a code of 128 or higher, the total character is compromised of two bytes.
HtmlFormatter.php is unware of the multibyte CP932 codepage. And calls DecodeUnicode() with only one character. iconv() then throws an exception, because only the half of the multibyte character was provided.
Activity
MircoBabin commentedon Mar 30, 2023
Bypass
For now I have implemented a bypass in HtmlFormatter.php by wrapping the iconv() call inside a try catch block:
But it would be nice if the CP 932 Shift-JIS codepage was correctly handled by this package.