All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Jason Yundt <jason@jasonyundt.email>
Cc: linux-man@vger.kernel.org, Florian Weimer <fweimer@redhat.com>,
	"G. Branden Robinson" <branden@debian.org>,
	?????? <nabijaczleweli@nabijaczleweli.xyz>
Subject: Re: man/man7/pathname.7: Correct handling of pathnames
Date: Tue, 28 Jan 2025 00:49:29 +0100	[thread overview]
Message-ID: <20250127234929.wbpd43qg2g65dlru@devuan> (raw)
In-Reply-To: <3hlim4xayawyffcqb4ykolrairbvsitn57p4jpwax2iqqqz6hw@4sn5qqdme2c6>

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

Hi Jason,

On Mon, Jan 27, 2025 at 06:07:30PM -0500, Jason Yundt wrote:
> > I would do in a GUI exactly the same as what command-line programs do:
> > pass the raw string to whatever API prints them.  If the string makes
> > sense in the current locale, it will be shown nicely.  If it doesn't
> > make sense, it will display weird characters, but that's not a terrible
> > issue.  Just run again with the appropriate locale.
> 
> OK, but how does that API figure out what characters to display?  What
> character encoding should that API use when drawing the characters?  I
> think that it???s OK to replace the current recommendation, but
> pathname(7) should really explain how such an API would figure out what
> characters need to be drawn on the screen.

That's not a pathname issue anymore.  It's just the issue of printing
bytes to a user.  I don't think pathname(7) should talk about how bytes
are shown to a user.

That wouldn't affect at all how applications handle files.

For example, I have just installed my new laptop (with the C locale),
and nab's name shows as ??????.  I expect a Japanese filename to be
shown similarly, although that depends on what each application wants to
do.  It doesn't really matter, since it's just a cosmetic issue.  The
string still contains the appropriate bytes, even if I can't read them
properly.  If I had a file called nab in cyrillic, I would expect ls(1)
to similarly show ??????, but internally just handle it well, because it
doesn't even look at the bytes; it just passes them through.


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-01-27 23:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 11:22 man/man7/pathname.7: Correct handling of pathnames Alejandro Colomar
2025-01-27 14:50 ` Jason Yundt
2025-01-27 15:53   ` Alejandro Colomar
2025-01-27 17:14     ` Jason Yundt
2025-01-27 17:37       ` Alejandro Colomar
2025-01-27 18:27         ` наб
2025-01-27 18:46           ` [PATCH v1] man/man7/pathname.7: Pathnames are opaque C strings Alejandro Colomar
2025-01-27 18:58             ` наб
2025-01-27 19:05               ` Alejandro Colomar
2025-01-27 19:10                 ` наб
2025-01-27 19:18                   ` Alejandro Colomar
2025-01-27 23:07         ` man/man7/pathname.7: Correct handling of pathnames Jason Yundt
2025-01-27 23:49           ` Alejandro Colomar [this message]
2025-01-28  3:06             ` Jason Yundt
2025-01-28 10:17               ` Alejandro Colomar
2025-01-28 18:31                 ` наб

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=20250127234929.wbpd43qg2g65dlru@devuan \
    --to=alx@kernel.org \
    --cc=branden@debian.org \
    --cc=fweimer@redhat.com \
    --cc=jason@jasonyundt.email \
    --cc=linux-man@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.