Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Test "failure" on multibyte conversions
- X-seq: zsh-workers 52185
- From: "Jun. T" <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Test "failure" on multibyte conversions
- Date: Sun, 24 Sep 2023 11:10:53 +0900
- Archived-at: <https://zsh.org/workers/52185>
- In-reply-to: <CAH+w=7ahJv0_X0VQEGJEnHxAEOx=hhiXHW-iJ-UuYeJduFU1qA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7ahJv0_X0VQEGJEnHxAEOx=hhiXHW-iJ-UuYeJduFU1qA@mail.gmail.com>
> 2023/09/24 0:52、Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> 5.4.0-162-generic #179-Ubuntu
> zsh-5.9-271-ge4e9afe
>
> ./D04parameter.ztst: starting.
> Test ./D04parameter.ztst failed: bad status 0, expected 1 from:
> : ${(#X):-0x80}
> Was testing: ${(#X)...}: out-of-range character
I can't reproduce this error (with zsh-5.9-271-ge4e9afe) on
5.15.0-75-generic #82~20.04.1-Ubuntu
or
6.2.0-33-generic #33~22.04.1-Ubuntu.
I guess wctomb() behaves differently on your Ubuntu. What do
you get by running the following C code? On my Ubuntu I get -1.
# On my Mac I get 1, but wctomb() is not used on macOS since
# __STDC_ISO_10646__ is not defined.
#include <stdio.h>
#include <locale.h>
#include <stdlib.h>
int main()
{
char buf[MB_CUR_MAX];
setlocale(LC_ALL, "C");
printf("%d\n", wctomb(buf, 0x80));
return 0;
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author