Dear All:
I want to commit a patch which support chinese input method on iOS 
platform.with this patch you can input unicode chinese character directly.

File:            SOURCE_ROOT/client/iOS/Controllers/RDPSessionViewController.m 
Method:    - (BOOL)textField:(UITextField *)textField 
shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString 
*)string 
Change to:
- (BOOL)textField:(UITextField *)textField 
shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString 
*)string{    if(string == nil || [string length] == 0) { // key touched is 
backspace        if(range.length > 0) {            [[RDPKeyboard 
getSharedRDPKeyboard] sendBackspaceKeyStroke];        }        return NO;    }  
      if([[UITextInputMode currentInputMode].primaryLanguage 
isEqualToString:@"zh-Hans"]       && (([string characterAtIndex:0] >= 'a' && 
[string characterAtIndex:0] <= 'z')           || ([string characterAtIndex:0] 
>= 'A' && [string characterAtIndex:0] <= 'Z'))) {           for(int i = 0 ; i < 
[string length] ; i++) {               unichar curChar = [string 
characterAtIndex:i];               if(curChar == '\n')                   
[[RDPKeyboard getSharedRDPKeyboard] sendEnterKeyStroke];           }           
return YES;    }        for(int i = 0 ; i < [string length] ; i++) {        
unichar curChar = [string characterAtIndex:i];        if(curChar == '\n')       
     [[RDPKeyboard getSharedRDPKeyboard] sendEnterKeyStroke];        else       
     [[RDPKeyboard getSharedRDPKeyboard] sendUnicode:curChar];    }    
textField.text = @"UserInput";    return NO;}




zhanleewo
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to