Benjamin Riefenstahl wrote:|
Here are my suggestions, which should make things work the same way as
all other Windows apps by default, and any changes to
selection-coding-system would be for specialised uses (ie, for use with
other software that does something unusual) so it would not be
unreasonable to expect users to either know what they are doing or have
a precise recipe to follow.
Benjamin Riefenstahl <address@hidden> writes:
We could decide not to use selection-coding-system at all. In that
case we probably don't need any variable at all, just trusting the
system to give us the right information.
On second thought, that would also loose the ability to specify a
non-default encoding for 8-bit text. Although I doubt that many
receiving applications use that correctly :-(. And those that could
use it will probably all prefer a Unicode version when we offer that
Default selection-coding-system to utf-16-le (or utf-16le, whichever is
When selection-coding-system is utf-16-le, use CF_UNICODETEXT, and put
a copy on CF_TEXT in the system's default encoding for Windows 9x apps
that do not understand Unicode.
If the user changes selection-coding-system, use only CF_TEXT or
CF_OEMTEXT, depending on the coding-system specified (codepage < 900
should be a good enough test I think, but double check there are not
exceptions). When putting data on the clipboard as CF_TEXT, we should
try to set an appropriate CF_LOCALE if we can determine it, so that
automatic conversion to CF_UNICODETEXT works correctly.