A puzzling copy/paste issue
I've been having an unusual problem with copy/paste under XQuartz for some time and haven't been able to figure it out. Perhaps someone here can help? Here's the issue -- when I select text in rxvt-unicode and hit Cmd-C, the text that ends up on the clipboard is treated as UTF32 for some reason. For instance, copying "xquartz" and running pbpaste|xxd gives me this: 0000000: 7800 0000 7100 00 x...q.. (Note that it's truncated to the length of the original string in bytes.) Here's where it gets weird: my laptop, which, as far as I can tell, is configured identically, is NOT affected. I've tried copying over the preferences plists, the rxvt-unicode build, /opt/X11, XQuartz.app... at this point, I'm not sure what's left that could be causing the difference! Other applications aren't affected (xterm and xedit, for instance). However, rxvt-unicode is only affected when copying data to the Mac clipboard (i.e, copy and paste within X11 still works fine), so I'm not sure whether this is an application issue, an XQuartz issue, or both! Also -- this only occurs when I launch rxvt-unicode with LANG set to "en_us-UTF-8". Unsetting LANG also makes the problem go away, at the expense of making UTF-8 not work either (which is kind of the whole point!). System details: OS: Snow Leopard, fully updated XQuartz: 2.4.1_alpha1, xorg-server 1.5.3-apple16 rxvt-unicode: 9.06, compiled with -arch x86_64
On Nov 5, 2009, at 15:24, Andrew Farmer wrote:
Also -- this only occurs when I launch rxvt-unicode with LANG set to "en_us-UTF-8". Unsetting LANG also makes the problem go away, at the expense of making UTF-8 not work either (which is kind of the whole point!).
BTW, the correct value for LANG there is en_US.UTF-8 still, this is quite odd. I use urxvt constantly, and I've never seen the problem you describe.
On 6 Nov 2009, at 11:20, Jeremy Huddleston wrote:
On Nov 5, 2009, at 15:24, Andrew Farmer wrote:
Also -- this only occurs when I launch rxvt-unicode with LANG set to "en_us-UTF-8". Unsetting LANG also makes the problem go away, at the expense of making UTF-8 not work either (which is kind of the whole point!).
BTW, the correct value for LANG there is en_US.UTF-8
Holy crap, that's it. I had LANG set to "en_us.UTF-8" on one system and "en_US.UTF-8" on the other... and, apparently, that's enough to trigger an error at urxvt startup: urxvt: the locale is not supported by Xlib, working without locale support. and make copy/paste later fail in mysterious ways. So there's that mystery solved! Thank you. (Although now the question is *why* a bad value for that environment variable breaks copy/paste so spectacularly.)
participants (2)
-
Andrew Farmer
-
Jeremy Huddleston