Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Feb 2018 10:42:36 -0500
From:      Farhan Khan <khanzf@gmail.com>
To:        Matthias Apitz <guru@unixarea.de>, freebsd-hackers@freebsd.org
Subject:   Re: Printing UTF-8 characters
Message-ID:  <CAFd4kYB_eU00Z5nBzp-iNGuELN4cy_ADGABb-boq4Fvn-a0XMg@mail.gmail.com>
In-Reply-To: <20180201072831.GA2239@c720-r314251>
References:  <CAFd4kYD_Q9Y84LvCGELVodt%2B30KM_KzNzoLOzudZm9kaLqGPaQ@mail.gmail.com> <20180201072831.GA2239@c720-r314251>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 1, 2018 at 2:28 AM, Matthias Apitz <guru@unixarea.de> wrote:
>
> El d=C3=ADa jueves, febrero 01, 2018 a las 01:15:34a. m. -0500, Farhan Kh=
an escribi=C3=B3:
>
> > Hi everyone,
> >
> > Is there a standard way to render historically non-printable UTF-8
> > characters that will work across all terminals? I am trying to modify a
> > standard FreeBSD utility that may occasionally work with characters in
> > other languages. On some terminals, specifically FreeBSD running in
> > VirtualBox, I see question-marks rather than the expected character. I
> > wonder if this is the proper way to display such non-printable characte=
rs
> > or no?
>
> Not sure what you mean with 'historically non-printable UTF-8'. UTF-8 is
> an encoding form (one of more) to present Unicode Codepoints in bytes. If
> you want to "print" them to paper or PDF there are ways to write them
> with Postscript and with the correct font-support to bring them into
> human readable form. If you want to "display" these UTF-8 bytes you need
> a terminal-software with UTF-8 support, for example from the ports x11/rx=
vt-unicode
> and the fonts for the Codepoint areas you want to display.
>
> Btw: Can you display my signature line correctly? There is an UTF-8 encod=
ed
> Codepoint for a mobile telephone :-)
>
>         matthias
> --
> Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea=
.de/  =F0=9F=93=B1 +49-176-38902045
> Public GnuPG key: http://www.unixarea.de/key.pub
>

Sorry, that was a poorly phrased question on my part. Let me try again.
I am trying to make text align in columns in a terminal. My
understanding is that characters above 0x7E are 3 bytes in length. A
modern terminal will render that as either a single question-mark or
the character itself, making terminal column alignment easy. But how
would an older terminal display a 3-byte character? I am worried that
would render as 3 question marks and throw off column alignment. If
so, is there a proper way to perform alignment for both newer and
older terminals?

I am reading this email on Gmail's, so those characters properly
render for me :)

Thanks,

--
Farhan Khan
PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFd4kYB_eU00Z5nBzp-iNGuELN4cy_ADGABb-boq4Fvn-a0XMg>