mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-04 08:30:54 +02:00
26954: read should pass through invalid multibyte characters
This commit is contained in:
parent
4f622ad570
commit
a6ff95d0c1
3 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-05-07 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 26945: Src/builtin.c, Test/D07multibyte.ztst: read should
|
||||||
|
pass through invalid multibyte characters.
|
||||||
|
|
||||||
2009-05-06 Clint Adams <clint@zsh.org>
|
2009-05-06 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 26937: Completion/Unix/Command/_git: have `git log` complete
|
* 26937: Completion/Unix/Command/_git: have `git log` complete
|
||||||
|
@ -11661,5 +11666,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.4677 $
|
* $Revision: 1.4678 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -5546,8 +5546,12 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
|
||||||
wc = (wchar_t)c;
|
wc = (wchar_t)c;
|
||||||
}
|
}
|
||||||
if (ret != MB_INCOMPLETE) {
|
if (ret != MB_INCOMPLETE) {
|
||||||
if (ret == MB_INVALID)
|
if (ret == MB_INVALID) {
|
||||||
memset(&mbs, 0, sizeof(mbs));
|
memset(&mbs, 0, sizeof(mbs));
|
||||||
|
/* Treat this as a single character */
|
||||||
|
wc = (wchar_t)c;
|
||||||
|
laststart = bptr;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* \ at the end of a line introduces a continuation line,
|
* \ at the end of a line introduces a continuation line,
|
||||||
* except in raw mode (-r option)
|
* except in raw mode (-r option)
|
||||||
|
|
|
@ -427,3 +427,9 @@
|
||||||
>Ą Пётр Ильич Чайковский 梶浦由記
|
>Ą Пётр Ильич Чайковский 梶浦由記
|
||||||
>Ą Пётр Ильич Чайковский 梶浦由記
|
>Ą Пётр Ильич Чайковский 梶浦由記
|
||||||
>Ą Пётр Ильич Чайковский 梶浦由記
|
>Ą Пётр Ильич Чайковский 梶浦由記
|
||||||
|
|
||||||
|
setopt cbases
|
||||||
|
print $'\xc5' | read
|
||||||
|
print $(( [#16] #REPLY ))
|
||||||
|
0:read passes through invalid multibyte characters
|
||||||
|
>0xC5
|
||||||
|
|
Loading…
Reference in a new issue