From: Clint Adams <clint@zsh.org>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: PATCH: Unicode additions, next phase.
Date: Wed, 26 Jan 2005 09:26:45 -0500 [thread overview]
Message-ID: <20050126142645.GA31701@scowler.net> (raw)
In-Reply-To: <200501261033.j0QAXmjA032042@news01.csr.com>
> Plus we'll probably need to have wcwidth on the menu at some
Oh dear.. also any memory allocations based on winw have to be modified.
> point... not sure if that helps with wide characters that are control
> characters (do these exist?), probably not. I'd be tempted to see if
> control characters were converted to a single byte string, if they do
> print them as at present, and if they don't just skip them; same for
> conversion failures, although that shouldn't happen for characters that
> convert to 7-bit ASCII anyway.
This uses '?' for both eventualities. That might obscure character
conversion errors.
Index: Src/Zle/zle_refresh.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
retrieving revision 1.15
diff -u -r1.15 zle_refresh.c
--- Src/Zle/zle_refresh.c 26 Jan 2005 13:39:52 -0000 1.15
+++ Src/Zle/zle_refresh.c 26 Jan 2005 14:24:23 -0000
@@ -478,7 +478,7 @@
nextline
}
#ifdef ZLE_UNICODE_SUPPORT
-# error What to do here
+ *s++ = ((*t == 127) || (*t > 255)) ? '?' : (*t | '@');
#else
*s++ = (*t == 127) ? '?' : (*t | '@');
#endif
@@ -488,7 +488,7 @@
i = wcrtomb(s, *t, &shiftstate);
if (i == -1) {
- /* error; what to do? */
+ *s++ = '?';
} else {
s += i;
}
next prev parent reply other threads:[~2005-01-26 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-25 14:46 Peter Stephenson
2005-01-25 16:02 ` Clint Adams
[not found] ` <clint@zsh.org>
2005-01-25 16:37 ` Peter Stephenson
2005-01-26 2:29 ` Clint Adams
2005-01-26 10:33 ` Peter Stephenson
2005-01-26 14:26 ` Clint Adams [this message]
2005-01-27 11:30 ` Matthias B.
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=20050126142645.GA31701@scowler.net \
--to=clint@zsh.org \
--cc=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/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).