[PATCH] Copy/Paste non-ascii characters

Kensuke Matsuzaki zakki@peppermint.jp
Mon Oct 13 01:33:00 GMT 2003


Jay,

Perhaps this patch enable XWin to copy/paste non-ascii characters
even if Windows does't support Unicode (95/98/Me).
LANG environment variable and Windows locale must be same.
I added -nounicodeclipboard option, I tested using this on XP.
But I don't have 95/98/Me.

And it seems tha libX11 has some CTEXT convertion bug, I attach
patch that based on TAKABE's work.
http://www.ff.iij4u.or.jp/~t-takabe/xf410_xim_fix.diff

By the way, nls/locale.alias has alias somethig like
"Arabic_Egypt.1256". Can we use that?
If so, we no longer need LANG environment variable.
We can get it following code.

  char pszCountry[128];
  char pszLanguage[128];
  int nAcp = GetACP ();
  
  GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, LOCALE_SENGCOUNTRY, pszCountry, 128);
  GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, LOCALE_SENGLANGUAGE, pszLanguage, 128);

  printf ("%s_%s.%d\n", pszLanguage, pszCountry, nAcp);

Kensuke Matsuzaki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clipboard_mb.diff
Type: application/octet-stream
Size: 11109 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20031013/89003995/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: X11.diff
Type: application/octet-stream
Size: 5448 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20031013/89003995/attachment-0001.obj>


More information about the Cygwin-xfree mailing list