Plan 9 from Bell Labs’s /usr/web/sources/contrib/mospak/abaco-modern/abaco-charset-utf8-default.patch

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


abaco: default charset to UTF-8

main.c:38 hard-codes the fallback charset as `iso-8859-1`.  abaco
uses this fallback (via convert() in util.c:956) for responses that
declare no charset in the HTTP Content-Type header, no <meta>, and
no XML prologue.  Almost all such responses today are UTF-8 pages
whose author omitted the declaration; iso-8859-1 mangles their
accented characters, Cyrillic, CJK, and smart quotes.

Flip the default to utf-8.  `abaco -t iso-8859-1 URL` still
overrides via the existing main.c:81 path.

RFC relevance: 3629 (UTF-8)

--- sys/src/cmd/abaco/main.c
+++ sys/src/cmd/abaco/main.c
@@ -35,7 +35,7 @@
 int	plumbwebfd;
 int	plumbsendfd ;
 char	*webmountpt = "/mnt/web";
-char	*charset = "iso-8859-1";
+char	*charset = "utf-8";
 int	mainstacksize = STACK;

 void	readpage(Column *, char *);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.