[Lazarus] logic bug in many (or most) TSynEdit

ik idokan at gmail.com
Fri Jun 4 16:59:40 CEST 2010


http://ik.homelinux.org/


On Fri, Jun 4, 2010 at 17:44, Martin <lazarus at mfriebe.de> wrote:

> 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?
>

Yes I am.


>
> Most of the highlighters are old, and haven't had much maintenance, so they
> do what was right 10 years ago....
>

It seems that the only maintained version of syntax highlight is the Pascal
version.


>
> 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.
>

On Delphi.NET they also allow multibyte names such as:

procedure פרוצדורה(const מחרוזת : String); ...




> If you source contains other chars (multy-byte utf8) in places where this
> is allowed, the pascal highlighting will continue to work.
>

There is a need to also add Bi-Directional support for multi-byte support. I
want to add it when I'll have some time for it.


>
> 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
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>

Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100604/bd924d03/attachment-0004.html>


More information about the Lazarus mailing list