<AWT Dev>  RFR JDK-8191178:[macos] Problem with input of yen symbol
prasanta.sadhukhan at oracle.com
Mon Sep 17 16:01:40 UTC 2018
I guess fullwidth currency symbols are
FULLWIDTH DOLLAR SIGN
FULLWIDTH POUND SIGN
FULLWIDTH YEN SIGN
etc which are already part of this check
(codePoint >= 0xFF00) && (codePoint <= 0xFFEF)
On 17-Sep-18 9:22 PM, Dmitry Markov wrote:
> Hi Prasanta,
> I think it would be wise to generate InputMethodEvent for ‘Fullwidth
> currency symbols’, as well.
>> On 17 Sep 2018, at 10:02, Prasanta Sadhukhan
>> <prasanta.sadhukhan at oracle.com
>> <mailto:prasanta.sadhukhan at oracle.com>> wrote:
>> Hi All,
>> 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"
>> 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
>> "\" character.
>> 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
>> isCodePointInUnicodeBlockNeedingIMEvent:[useString characterAtIndex:0]]/
>> 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 symbols.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8191178
>> webrev: http://cr.openjdk.java.net/~psadhukhan/8191178/webrev.0/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev