From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: (LC_ALL=C; set -x 128 129; printf "%s\n" ${(#)@} | hexdump -C)
Date: Wed, 13 Sep 2023 18:59:34 +0900 [thread overview]
Message-ID: <C3C2FCAB-0D5D-4CD0-8949-75AA9971681E@kba.biglobe.ne.jp> (raw)
In-Reply-To: <C4E4AB11-41FC-4EA8-8B8A-C531241E2429@kba.biglobe.ne.jp>
> 2023/09/11 21:11, Jun. T <takimoto-j@kba.biglobe.ne.jp> wrote:
>
> This is some test for (#) and (#X).
Sorry, I've already pushed this, but the test fails on FreeBSD,
DragonFly and NetBSD for out-of-range characters.
On these OSes (with or without my patch):
% LC_ALL=C zsh -f
% echo ${(#):-0x80} | hexdump -C
00000000 3f 0a |?.|
00000002
This is due to the peculiar behavior of iconv(3). It converts
out-of-range character to '?' (0x3f) with return value 1,
indicating that one character is converted in "non-reversible" way.
I feel this is a "bug" of iconv(), but maybe better to implement
some workaround. I'm getting rather busy now, but hopefully I can
work on this within a few days.
next prev parent reply other threads:[~2023-09-13 10:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 7:27 Stephane Chazelas
2023-08-30 19:45 ` Bart Schaefer
2023-08-31 17:38 ` Jun. T
2023-09-07 14:26 ` Jun. T
2023-09-07 16:33 ` Peter Stephenson
2023-09-08 16:30 ` Jun. T
2023-09-11 8:57 ` Peter Stephenson
2023-09-11 12:11 ` Jun. T
2023-09-13 9:59 ` Jun T [this message]
2023-09-21 9:26 ` Jun T
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=C3C2FCAB-0D5D-4CD0-8949-75AA9971681E@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).