From owner-freebsd-hackers@freebsd.org Thu Feb 1 15:42:58 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC64EED8D69 for ; Thu, 1 Feb 2018 15:42:57 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84A0272643 for ; Thu, 1 Feb 2018 15:42:57 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id t201so10754189ywf.1 for ; Thu, 01 Feb 2018 07:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=TZSWrsdBJetofYRj0Qj96tpnKNCCkUXuApOjoT8h54s=; b=JcdrVfHzybSwfTZ0DqogKH9nVcGQq+r4vIEJaUnyXDrS3FXDGPNHr6f2MrCDERd7MS pn/K/o0gL1wIqL3x8jtiww8WS75G8GLNZ9ugfHpLHNESiSHBMJ9RR3h6MrbxFV71PsH5 /2gdwf60B/3xlgr2Om3vYcSuBUBFELL6cjgKJnpKplQOo3NDMr6Mi4Cnu4XHxxnJzOxM eWdonJFmYMVy9Exev8qI/2IEmk9HXVcTONZcTN5uFzjcPvhKGP0ZXK2adY/yqvERlN8O +Jb+kpOTV7NSmVlrHvm+cbb3N/UqeHomo32vWyg2EmyGZOltvcu/nPOAMK40xStCwTtD YuTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=TZSWrsdBJetofYRj0Qj96tpnKNCCkUXuApOjoT8h54s=; b=YKNzYLzpiD3NBzX61k4FVRQ/VbE95ptpO+pWLle3FE4ZU2B2sCaG8e/1gjsSVbBbGf /FLATeMXfh7dCaMp6qyuaPrZQs0oJQVVG+aEwrDIhvgsAS9HsT4TrPFfjuzTeJZ8h7oz Z0elTLiO365bXBLyWhTyEIfv9PDj/iSAd5GWlj84FNylvTEocytbusLlFenNGlRIOG6i Yj1G1HqQ1fZND5cg1UdgGlEnLdGXgviO5GuzNcjmHtuWvGBadRpuDvgAQYGoAH8d70XE 1yAlomBJ1Hcym9V4E1/Yj3lDoNL9nRL41oaCW+Ot5Xn2EHXRhFB+0rGo+VFPRSaPLIuf vaFw== X-Gm-Message-State: AKwxytfca4Q4MVZ5uWXfCfxRL3K2aVUABHwT6SfAOggn75BUzaYZ/v+6 FQsvz2zQa7dQZm3PaELSCv+7LSR3DlRX5lBKyj8TQytw X-Google-Smtp-Source: AH8x227YEx/06yAulcSeR5iAuoq1rbwAD/gXAW27oBqzffpyYLAUe+3uISrZKQA0aauFz/ncMe4OJ9rKHVDpV7l/Ipw= X-Received: by 10.129.83.3 with SMTP id h3mr24958786ywb.268.1517499776809; Thu, 01 Feb 2018 07:42:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.94.214 with HTTP; Thu, 1 Feb 2018 07:42:36 -0800 (PST) In-Reply-To: <20180201072831.GA2239@c720-r314251> References: <20180201072831.GA2239@c720-r314251> From: Farhan Khan Date: Thu, 1 Feb 2018 10:42:36 -0500 Message-ID: Subject: Re: Printing UTF-8 characters To: Matthias Apitz , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 15:42:58 -0000 On Thu, Feb 1, 2018 at 2:28 AM, Matthias Apitz 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