Stefano Franchi wrote:
> I still don't understand why
> I can get ß in the minibuffer (with, on my Mac, option-s) and not in
> the main window, but I can live in blissful ignorance for now.
Because we leave it to the Qt toolkit to interpret your key presses when in
the minibuffer and then deal with the result of those key presses (some
character in an internal Qt encoding. Let's call that encoding "unicode").
Thereafter, we translate this unicode-encoded character into one encoded
in the local 8 bit encoding that you use in the main, LyX window. The code
looks something like:
QString const data_from_minibuffer = ...;
std::string const data_in_local_8_bit_encoding =
fromqstr(data_from_minibuffer);
where fromqstr() is a function that performs the magical transformation.
The LyX core deals with this std::strings, not with QString objects.
However, in the main LyX window, we need to interpret each and every key
press and so must generate the std::string from these key presses. We
can't leave things to Qt. Our own, home grown key handling code is less
sophisticated than Qt's, but crucially for us, we have total control over
it to do lots of other stuff.
--
Angus