8278232: [macos] Wrong chars emitted when entering certain char-sequence of Indic language
Reviewed-by: prr
This commit is contained in:
parent
0dba170791
commit
94380d0e46
@ -546,12 +546,13 @@ static BOOL shouldUsePressAndHold() {
|
||||
-(BOOL) isCodePointInUnicodeBlockNeedingIMEvent: (unichar) codePoint {
|
||||
if ((codePoint == 0x0024) || (codePoint == 0x00A3) ||
|
||||
(codePoint == 0x00A5) ||
|
||||
((codePoint >= 0x900) && (codePoint <= 0x97F)) ||
|
||||
((codePoint >= 0x20A3) && (codePoint <= 0x20BF)) ||
|
||||
((codePoint >= 0x3000) && (codePoint <= 0x303F)) ||
|
||||
((codePoint >= 0xFF00) && (codePoint <= 0xFFEF))) {
|
||||
// Code point is in 'CJK Symbols and Punctuation' or
|
||||
// 'Halfwidth and Fullwidth Forms' Unicode block or
|
||||
// currency symbols unicode
|
||||
// currency symbols unicode or Devanagari script
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
@ -957,11 +958,17 @@ static jclass jc_CInputMethod = NULL;
|
||||
|
||||
#ifdef IM_DEBUG
|
||||
NSLog(@"insertText kbdlayout %@ ",(NSString *)kbdLayout);
|
||||
|
||||
NSLog(@"utf8Length %lu utf16Length %lu", (unsigned long)utf8Length, (unsigned long)utf16Length);
|
||||
NSLog(@"codePoint %x", codePoint);
|
||||
#endif // IM_DEBUG
|
||||
|
||||
if ((utf16Length > 2) ||
|
||||
((utf8Length > 1) && [self isCodePointInUnicodeBlockNeedingIMEvent:codePoint]) ||
|
||||
((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"]))) {
|
||||
#ifdef IM_DEBUG
|
||||
NSLog(@"string complex ");
|
||||
#endif
|
||||
aStringIsComplex = YES;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user