On Sat, 19 Apr 2014, Shintaro Nakagawa wrote:
Thank you for your response.
And thanks to you for persevering with this.
> OK, in the latest quartz snapshot I've added a little box
that displays in
> hex the first 5 bytes of the buffer that gretl sends to pbcopy when
> copying RTF to the pasteboard; that is, the bytes that should compose
> "{\rtf".
>
> This should enable us to see if the second byte as emitted by gretl is
> 0x5C or 0x5A.
I tried copying RTF with the current snapshot. The dialog box showed
gretl_clipboard_set, first 5 bytes:
0x7b 0x5c 0x72 0x74 0x66
Ah, so gretl is sending the correct byte for ASCII backslash but pbcopy is
mapping it to the Yen symbol.
There's now a new experiment in the quartz snapshot. In the case of ASCII
text representing RTF I'm calling setlocale() to set LC_CTYPE to "C"
before opening a pipe to pbcopy. Hopefully this should prevent pbcopy from
remapping 0x5c.
Allin