TIP: Click on subject to list as thread! ANSI
echo: golded
to: Michiel van der Vlist
from: Vitaliy Aksyonov
date: 2024-03-03 16:31:00
subject: Re: Need volonteers to te

Hello Michiel.

03 Mar 24 22:31, you wrote to Nicholas Boel:

 NB>> So, at this point it's basically working and displaying properly,
 NB>> but then comes in the 'characters' vs 'bytes' thing that Golded
 NB>> isn't supporting, so it is wrapping what it thinks is double,
 NB>> triple, or even quadruple the amount of 'characters' that are
 NB>> there.

 MvdV> When it comes to mapping the number of characters to the number of
 MvdV> bytes, when you look at the  UTF-8 encoding table, about two screens
 MvdV> down here:

 MvdV> https://en.wikipedia.org/wiki/UTF-8

 MvdV> You can see that the length of the byte sequence can be determined
 MvdV> just by looking at the first byte. Look from bit 7 to the right. The
 MvdV> number of '1' bits equals the number of bytes in the character. All
 MvdV> the follow up bytes start with '10'. So to get the number of
 MvdV> characters ignore the bytes starting with '10' when counting the
 MvdV> bytes.

 MvdV> Breaking a line should only occur /before/ a byte starting with '0' or
 MvdV> '11'.

 MvdV> Knowing all that it should be doable to let Golded display properly.

 MvdV> Perhaps the best strategy is to have Golded alway use UTF-8
 MvdV> internally. Almost everyone else does these days...

That would be perfect. It only takes huge amount of effort. Especially with keeping code backward compatible with systems, which may not have Unicode support. I keep thinking about it and looking for possible ways to implement.

For now I'd be happy to make iconv work properly. In this case GoldEd user may get rid of most (if not all) of translation tables. The problem is that source code has huge amounts of duplicated code and sometimes functions and variables names say nothing about what do they do. I spend huge amount of time just to understand what's going on.

For example function, which splits message to lines is almost 1000 lines long! It has variables, used in multiple places, it not only splits the message, but guess charset, do recoding and other fun stuff.

Vitaliy

--- GoldED+/LNX 1.1.5-b20240223
                                                                         
* Origin: Aurora, Colorado (1:104/117)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.