Alexander Klenin wrote:
> On 10/27/07, Stefan Küng <tortoisesvn@gmail.com> wrote:
>> The log dialog now uses the scintilla control to show the log messages.
>> But as you might have seen on this list, it doesn't work properly with
>> non-ASCII chars.
>> As I recall, your reason for using the scintilla control was to later
>> implement the 'edit log message' directly in that control, without the
>> need for a separate dialog. But that's a small feature compared to
>> having the control showing all chars correctly.
>> So what do you think: should we maybe revert back to using the rich edit
>> control for showing the log messages?
>
> Oops, I was catching up on my mail and noticed issue change before this message,
> so already replied there. However, I will repeat my arguments here to
> simplify further discussion.
>
> We could do the revert, yes, but it would be pity.
> Using scintilla resulted in a lot of unification and duplicate code removal.
I'd rather have duplicate code and something that works than having
duplicate code removed and something that doesn't work properly.
> So I would really like to investigate the issue first.
> As I already said, I use Russian characters in log messages every day,
> and have not had any problem with them.
Try showing the log for
http://dev.textcube.org/svn
You will see that the short message in the top pane is shown correctly,
but the full message is not (pick any log message you want).
> So this bug seems to be specific to Korean (Asian?) languages.
> I think that the bug is generally worth fixing, even if only
> for the fact that is should definitely apply to the current 'Edit log
> message' dialog too.
The problem is, you simply can't fully fix this: scintilla can't be
compiled in unicode mode (yes, I tried but gave up after three hours
patching the code). Which means it has to use the MBCS versions of the
Windows API, the window is created in ascii mode, the text input is
ascii, ...
And without full unicode support from the OS, it's simply not possible
to show all characters properly (Yes, even using ExtTextOutW() instead
of ExtTextOutA() won't help here, because the window isn't unicode).
Which means: unless the scintilla guys finally decide to change their
control to fully support unicode on windows, you can't fix this. And
good luck convincing them to do that - they even rejected a patch from
me because it used SendMessage and expected a return value in one of its
parameters (something that's very common). Reason: it would be hard for
some programming languages to use that function (call me crazy, but I
don't accept such arguments).
> On 10/27/07, Stefan Küng <tortoisesvn@gmail.com> wrote:
>> Simon Large wrote:
>>> How does that work? The commit dialog uses the Scintilla control to
>>> write the log message, so why can't it display?
>> It has to do with unicode normalization and the different precomposed
>> states unicode can have.
>
> Hm. How did you get this info?
> Can you give me a sample of exact byte sequence which reproduce this?
> With that, I am willing to at least try to find a fix before falling
> back to the old code.
Well, that fix is easy: change the custom utf8/utf16 conversion
functions in Scintilla to use MultiByteToWideChar and
WideCharToMultiByte. But that won't fix the problem chars not showing on
non 'native' OS - something I consider important in the log dialog (not
a problem in the commit dialog: if I don't have the locales set to e.g.
Korean, I can't enter such glyphs anyway because my keyboard isn't set
properly).
>> I'd rather write my own control which is *fully* unicode aware (scintilla is not).
> It is a whole lot of work.
> It looks like scintilla team works on Unicode support, e.g. the message
> "Unicode support extended to all Unicode characters not just the Basic
> Multilingual Plane."
> in the last release noted sounds encouraging ;-)
That part of the release notes only states that scintilla won't crash
anymore with such chars - but it still can't show them properly (you'd
have to split a string first into glyphs, then draw each glyph seperately).
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Oct 27 16:37:37 2007