On Wed, Aug 25, 2021 at 9:45 AM David Malcolm <dmalc...@redhat.com> wrote:
> > BTW, do you think it would be worthwhile to work on the other half of
> > encoding support, i.e. translating from UTF-8 to the user's locale,
> > when outputting diagnostics? I have probably 90% of a patch that does
> > this, however it complexifies things a bit and I am not sure if it is
> > really worth the trouble. What is rather manageable (that my patch in
> > progress does now) is to replace non-translatable characters with
> > something like UCN escapes. What is not so easy, is to do this and
> > preserve the alignment of carets and label lines and such... this
> > requires making the display width of a character also
> > locale-dependent, which concept doesn't exist currently. Adding that
> > feels like a lot of complication for what would be a little-used
> > feature... Anyway, if you think a patch that does the translation
> > without preserving the alignment would be useful, I could finish it
> > up
> > and send it. Otherwise I was kinda inclined to forget about it.
> > Thanks!
>
> Maybe post the patch you have so far, making clear that it's
> unfinished/work-in-progress?  I think I'll find it easier to think
> about this with a patch in hand rather than a description of a patch,
> and also, that way the list archives will have a copy of your work in
> case we do want to finish it at some later point (rather than it just
> being on your hard drive).

I created PR102099 about this
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102099) and posted the
patch there. It's pretty complete, although it has a couple issues I
mention in the PR. Thanks!

-Lewis

Reply via email to