Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
mobilehunter is currently offline  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);
  }
}
Re: cjk - XIM - upp only process one character [message #15743 is a reply to message #15664] Tue, 06 May 2008 21:50 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, patched!

Mirek
Previous Topic: simplified chinese not supported in T_?
Next Topic: How to retrieve current language?
Goto Forum:
  


Current Time: Fri Apr 19 13:31:38 CEST 2024

Total time taken to generate the page: 0.02122 seconds