Dear Allin
Thank you for your revision. I tried the latest snapshot.
The "Couldn't open pbcopy" problem is solved.
However, when I copied a model table as RTF, the table was pasted as a source of RTF.
This phenomenon did not occur when I set CFUserTextEncoding as 0:0.
By the way, I complied the following program on my Japanese environment and executed it on
Terminal. It worked fine.
#include <stdio.h>
#include <stdlib.h>
#include <err.h>
#define BUF 256
int main (int argc, char *argv[])
{
FILE *fp;
char *cmdline = "/usr/bin/pbcopy";
if ( (fp=popen(cmdline,"w")) ==NULL) {
err(EXIT_FAILURE, "%s", cmdline);
}
(void) fputs("{\\rtf \\b Hello! from C}", fp);
(void) pclose(fp);
exit (EXIT_SUCCESS);
}
I set the encoding of the above program as UTF8.
After executing the above program on Terminal, I can paste "Hello! from C" in
bold font into Word.
I hope that it will help you.
Finally, I am sorry to take up your time.
Thank you and best regards,
Shintaro Nakagawa