public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: starner@okstate.edu To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: ada/6726: -gnaty miscounts characters in UTF-8 source text Date: Sat, 14 Dec 2002 19:26:00 -0000 [thread overview] Message-ID: <20021215032601.16379.qmail@sources.redhat.com> (raw) The following reply was made to PR ada/6726; it has been noted by GNATS. From: starner@okstate.edu To: bosch@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, starner@okstate.edu, gcc-gnats@gcc.gnu.org Cc: Subject: Re: ada/6726: -gnaty miscounts characters in UTF-8 source text Date: Sat, 14 Dec 2002 21:19:12 -0600 (CST) >State-Changed-From-To: open->closed [...] > The line length limitation of -gnaty switch is intended to make sure that all lines fit on a regular terminal screen, so that the source can be viewed without problems on all screens. Another issue is that not all wide characters necessarily are the same width: many Asian fixed-spacing terminal fonts use double-width characters for certain glyphs. You've stated the problems involved in getting this to work completely right. What about actually fixing the bug in some way? You could * Drop in a wcwidth implementation. Markus Kuhn has a wcwidth implementation in a page or two of code. * Just calling all non-ASCII Unicode characters single width or double width. It's a better approximation then the triple width, which most UTF-8 characters are counted as and which is never actually true. * Disabling character counts for lines on which non-ASCII characters appear, possibly with a warning. It's ugly, and the warning is probably overkill, but it works. * Documenting it would be a good start. The current documentation says If the ^letter m^word LINE_LENGTH^ appears in the string after @option{-gnaty} then the length of source lines must not exceed 79 characters, including any trailing blanks. The value of 79 allows convenient display on an 80 character wide device or window, allowing for possible special treatment of 80 character lines. If you chose to interpret this as a documentation error instead of a code error, then so be it. But it's clearly one or the other or both.
next reply other threads:[~2002-12-15 3:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-12-14 19:26 starner [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-12-14 13:11 bosch 2002-05-19 15:16 starner 2002-05-19 15:06 starner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021215032601.16379.qmail@sources.redhat.com \ --to=starner@okstate.edu \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).