[Edited for clarity]
Hi, I have a quite specific character encoding problem that I'm hoping I can solve with KM v9.2.
I am running a Windows XP virtual machine under MacOS 11.2.3 using Parallels. I need to copy various bits of text from a program running in XP, including formatting such as italics and bolded characters. I then need to be able to paste that text into programs in MacOS. The program I'm copying from uses RTF clipboard formatting, so that's what I use.
I presume the Windows machine is using Windows-1252/ISO-8859-1 character encoding.
In XP, when I copy text to the clipboard, which is shared by the host and guest operating systems, I get character encoding errors on the MacOS clipboard. For example, the clipboard (viewed using the KM clipboard switcher) looks like this:
Eine unterdrþckte Vorrede, unverüffentlicht.
The italics are correct, but the characters should look like this:
Eine unterdrückte Vorrede, unveröffentlicht.
Now, I can convert the wrong characters to correct characters with "Set Clipboard to Plain", for example, but then I lose the formatting (the italics).
I have tried using the "Execute shell script" option, with commands such as:
pbpaste | iconv -f ISO-8859-1 -t UTF8 | pbcopy
or the following to convert to html, in an attempt to retain the formatting:
pbpaste | textutil -convert html -stdin -stdout | pbcopy
But the first option drops the formatting and further mangles the characters, and the second option drops the formatting (no tags for the italics that are on the clipboard), though it does produce the correct characters.
I also tried unrtf to produce html output, in an attempt to retain the formatting:
pbpaste | unrtf --html | pbcopy
but that too drops the italics for some reason, and also drops the accented characters.
So, in short, is there a way to take the initial clipboard data from XP and convert the characters to correct characters while retaining the formatting?