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
When using the Japanese IME (Microsoft IME) with winit, the cursor_range value in Ime::Preedit(text, cursor_range) becomes corrupted.
For example, when trying to convert the string “ぶたがなく” within the range of “ぶたが”, the cursor_range should ideally be "(start)🐖が(end)なく". However, it ends up being "(start)🐖がな(end)く", with the (end) position being off by one character.
This issue arises because the character “🐖” is passed as a UTF-16 surrogate pair in Windows. Although the cursor position attribute is also based on UTF-16, winit’s calculation of cursor_range does not account for surrogate pairs.
Please update the cursor_range calculation to handle surrogate pairs correctly.
Windows version
Microsoft Windows [Version 10.0.22631.4317]
Winit version
In versions 0.28.1 and later
The text was updated successfully, but these errors were encountered:
Description
When using the Japanese IME (Microsoft IME) with winit, the cursor_range value in Ime::Preedit(text, cursor_range) becomes corrupted.
For example, when trying to convert the string “ぶたがなく” within the range of “ぶたが”, the cursor_range should ideally be "(start)🐖が(end)なく". However, it ends up being "(start)🐖がな(end)く", with the (end) position being off by one character.
This issue arises because the character “🐖” is passed as a UTF-16 surrogate pair in Windows. Although the cursor position attribute is also based on UTF-16, winit’s calculation of cursor_range does not account for surrogate pairs.
Please update the cursor_range calculation to handle surrogate pairs correctly.
Windows version
Winit version
In versions 0.28.1 and later
The text was updated successfully, but these errors were encountered: