Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » cjk - XIM - upp only process one character 
	
		
		
			| cjk - XIM - upp only process one character [message #15664] | 
			Sat, 03 May 2008 08:26   | 
		 
		
			
				
				
				
					
						  
						mobilehunter
						 Messages: 87 Registered: November 2006 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		It seems with current implementation upp only process one character received from Xutf8LookupString, and ignore the rest characters. 
 
I changed codes at X11Proc.cpp.  
I changed some behaviour at KeyRelease case from Ctrl::EventProc function. 
 
These codes will make upp to process all the characters received. 
WString stringUtf8;//ADDED For CJK
if(pressed && w.xic) {
  Status status;
  int len = Xutf8LookupString(w.xic, &event->xkey, buff, sizeof(buff), &keysym, &status);
  buff[len] = 0;
  if(status == XLookupChars || status == XLookupBoth)
  {
     chr = FromUtf8(buff, len)[0];
     //ADDED For CJK
     if(status == XLookupChars)
     {
        stringUtf8 = FromUtf8(buff, len);
     }
  }
  else
  if(status != XLookupKeySym && status != XLookupBoth)
     keysym = 0;
}
 
... 
if(chr && pressed)//ADDED For CJK
{
  DispatchKey(chr, count);
  int strLen = stringUtf8.GetLength();
  for(int ii=1;ii<strLen;ii++)
  {
     DispatchKey(stringUtf8[ii], count);
  }
}
 
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 13:45:29 CET 2025 
 Total time taken to generate the page: 0.05235 seconds 
 |