[Lazarus] logic bug in many (or most) TSynEdit
Martin
lazarus at mfriebe.de
Fri Jun 4 16:44:47 CEST 2010
On 04/06/2010 13:32, ik wrote:
> Hello,
>
> I'm reading a lot of code of SynEdit, and I find a big logical bug
> with how things implemented.
>
> Many programming languages such as Python, Ruby, Javascript and few
> others, are supporting unicode based named for methods, functions,
> class, variables etc...
> It allow everyone that wish to do it, to create for example in non
> latin chars names, including also umlets and other chars.
>
> The implementation of TSynEdit is to run across all of the ASCII table
> (0..255) and act only by this. And that's a logical bug imho.
You speak of the SynHighlighter, or the actual SynEdit?
Most of the highlighters are old, and haven't had much maintenance, so
they do what was right 10 years ago....
Pascal-Highlighter, can resolve to the trick of treading text of ascii.
All pascal relevant keywords are limited to latin chars => and they are
the same in Ascii/Ansi or utf8.
If you source contains other chars (multy-byte utf8) in places where
this is allowed, the pascal highlighting will continue to work.
SynEdit itself => outside the Highlighter, does full utf8 handling
(including (double) full-width Chinese chars).
Otherwise please point out some examples (and make sure you are using
SynEdit from SVN/trunk / latest snapshot)
Martin
More information about the Lazarus
mailing list