git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t: use user-specific utf-8 locale for testing

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 8, 2021, 10:49 UTC
Message-ID
<874ke62f41.fsf@evledraar.gmail.com>
In-Reply-To
<YLfiYXxQqXL7RyHC@nand.local>
On Wed, Jun 02 2021, Taylor Blau wrote:
Show 7 quoted lines
> On Wed, Jun 02, 2021 at 06:46:46PM +0700, Đoàn Trần Công Danh wrote:
>> Despite being required by POSIX, locale(1) is unavailable in some
>> systems, e.g. Linux with musl libc.  Some of those systems support
>> utf-8 locale out of the box.
>
> Hmmph. I would have imagined that locale was available everywhere, but
> unfortunately not.

Small and unsolicited history lesson from a person with funny characters in their name & language :)

Today it seems like *nix systems have always had UTF-8, but this was a relatively late development.

It's Plan9 that had UTF-8 from the start, on *nix systems it was US-ASCII, and anything else was tacked on top later on.

When I started using *nix systems I belive it was quite common to have default configurations with only ISO-8859-1 locales installed, and certainly that's what a lot of or most users who had the need for locales in European languages not covered by US-ASCII used by default.

This is from hazy memory, but I think it was even actively recommended against having or using UTF-8 locales on the system. If you e.g. connected to an IRC channel, or copy/pasted from your text editor into an E-Mail you could easily send the other end misencodedgibberish.

Later on things like IRC channels in these languages had a "switch day", it was a complete mess. Nowadays mostly nobody really notices or remembers anymore these encoding issues since we've mostly got UTF-8 everywhere as a result.

I mean, at least in the case of European languages, I understand e.g. Japanese and Chinese still have their own persistent encoding issues related to competing standards.

Even today you can't rely on UTF-8 even on Linux systems, and I think this has become even more true of late with minimal CI systems or other chroot-like test environments.

Previous: Taylor BlauNext: Jeff King
Message 3 of 19 in “t: use user-specific utf-8 locale for testing”
  1. t: use user-specific utf-8 locale for testingĐoàn Trần Công Danh, Jun 2, 2021
  2. Taylor BlauJun 2, 2021
  3. Ævar Arnfjörð BjarmasonJun 8, 2021
  4. Jeff KingJun 3, 2021
  5. Bagas SanjayaJun 4, 2021
  6. Đoàn Trần Công DanhJun 4, 2021
  7. t: use user-specific utf-8 locale for testingĐoàn Trần Công Danh, Jun 6, 2021
  8. Torsten BögershausenJun 6, 2021
  9. Junio C HamanoJun 7, 2021
  10. t: use pre-defined utf-8 locale for testing svnĐoàn Trần Công Danh, Jun 7, 2021
  11. Junio C HamanoJun 7, 2021
  12. Torsten BögershausenJun 7, 2021
  13. Đoàn Trần Công DanhJun 7, 2021
  14. Jeff KingJun 8, 2021
  15. Đoàn Trần Công DanhJun 8, 2021
  16. t: use user-specified utf-8 locale for testing svnĐoàn Trần Công Danh, Jun 7, 2021
  17. Jeff KingJun 8, 2021
  18. t: use user-specified utf-8 locale for testing svnĐoàn Trần Công Danh, Jun 8, 2021
  19. Jeff KingJun 8, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.