From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: multibyte FAQ (MacOS X)
Date: Wed, 21 Dec 2005 16:15:04 +0000 [thread overview]
Message-ID: <20051221161504.2ecea4de.pws@csr.com> (raw)
In-Reply-To: <200512181941.jBIJf8Ci004603@pwslaptop.csr.com>
Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> I've still had no luck with Solaris, even Solaris 9. It didn't help
> that the only UTF-8 locale around was ru_RU.UTF-8, but that isn't the
> basic problem and I don't know what is; it seems that even obvious
> multibyte strings like accented Latin characters aren't being
> recognised, even though all the functions are present, the terminal
> works fine with other multibyte systems, and LANG is set correctly.
On further investigation it seems that when given the first byte of a
multbyte character, mbrtowc() sometimes returns -1 (error) instead of -2
(incomplete). Reading another character and then passing both to mbrtowc()
worked. Sometimes later in the line it works as expected, returning -2 for
an initial byte. It doesn't seem to be tied to the mbstate_t parameter in
an obvious way, indeed it wasn't obvious that was doing anything at all.
I had a go at rewriting getrestchar() to look for other queued bytes, but
that wasn't good enough and I haven't yet had a chance to look at why.
>From the silence so far it seems like no one has encountered this before.
I wonder if it's some interaction between the library and gcc.
I won't have a chance to get any further before Christmas. I'll be away
till the 3rd January.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
prev parent reply other threads:[~2005-12-21 16:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 18:31 PATCH: multibyte FAQ Peter Stephenson
2005-12-14 18:41 ` Peter Stephenson
2005-12-15 14:42 ` Peter Stephenson
2005-12-14 19:25 ` [22076] " Danek Duvall
2005-12-14 21:09 ` Peter Stephenson
2005-12-16 9:39 ` Danek Duvall
2005-12-16 17:13 ` Bart Schaefer
2005-12-18 19:38 ` Danek Duvall
2005-12-18 21:10 ` Bart Schaefer
2005-12-18 14:14 ` PATCH: multibyte FAQ (MacOS X) Jun T.
2005-12-18 15:26 ` Andrey Borzenkov
2005-12-19 9:08 ` Jun T.
2005-12-18 19:41 ` Peter Stephenson
2005-12-21 16:15 ` Peter Stephenson [this message]
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=20051221161504.2ecea4de.pws@csr.com \
--to=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).