<AWT Dev>  RFR JDK-8191178:[macos] Problem with input of yen symbol
prasanta.sadhukhan at oracle.com
Mon Sep 17 09:02:42 UTC 2018
Please review a fix for an issue where
when "yen" symbol is entered from a keyboard using Romaji keyboard
layout using "backslash" character, it was showing a "backslash" character
rather than "yen" symbol.
This is a regression of JDK-8068283
<https://bugs.openjdk.java.net/browse/JDK-8068283> where the check to
control JNI invocation of
"sun.lwawt.macosx.CInputMethod.insertText(String)" is changed from
"if ([self hasMarkedText] || !fProcessingKeystroke || (utf8Length > 1))
if ([self hasMarkedText] || !fProcessingKeystroke || (utf16Length > 2))
Now, in this case for "yen" symbol, the utf16Length is 2 so
InputMethodEvent is not generated, rather a KeyEvent is generated for
This check was again modified for JDK-8132503
<https://bugs.openjdk.java.net/browse/JDK-8132503> where the check for
unichar belongs to certain unicode block is introduced
/(utf8Length > 1) && [self
Now, there although utf8Length is 2 the check for codepoint is complex
or not does not take into account "unicode" currency symbols.
It only takes into account CJK symbols and punctuations and "Halfwidth
and Fullwidth Forms' Unicode block.
Proposed fix also add "currency" symbol unicode
in the mix so that we can have InputmethodEvent generated for currency
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev