zsh-workers
 help / color / mirror / code / Atom feed
From: DervishD <zsh@dervishd.net>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: Some groundwork for Unicode in Zle
Date: Tue, 11 Jan 2005 16:09:40 +0100	[thread overview]
Message-ID: <20050111150940.GC3445@DervishD> (raw)
In-Reply-To: <200501111352.j0BDqCKs001801@news01.csr.com>

    Hi Peter :)

 * Peter Stephenson <pws@csr.com> dixit:
> I'm still not sure how to test whether a multibyte
> string is invalid rather than incomplete.

    AFAIK, mbrtowc returns -1 for invalid and -2 for incomplete (and
a 0 for the NULL widechar). Although the return value is 'size_t' is
nearly impossible for the function to return (size_t) -1 (or -2) for
a *correct* conversion in UTF-8. I think there is a safe bet to
assume that even an ill-formed operating system not honoring C99 will
have SIZE_MAX greater than 8 XDDDDD

    I haven't used myself the restartable set of multibyte functions,
so please take a look at SUS, POSIX or whatever to see the gory
details for this function. I've used SUS for reference.
 
    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
It's my PC and I'll cry if I want to...


  parent reply	other threads:[~2005-01-11 15:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-11 13:52 Peter Stephenson
2005-01-11 13:59 ` Peter Stephenson
2005-01-11 15:11   ` DervishD
2005-01-14 13:10   ` Peter Stephenson
2005-01-15 17:35     ` Clint Adams
2005-01-15 19:28       ` Peter Stephenson
2005-01-17 10:59         ` NUL must be a first class citizen [was: Some groundwork for Unicode in Zle] Matthias B.
     [not found]           ` <msbREMOVE-THIS@winterdrache.de>
2005-01-17 11:19             ` Peter Stephenson
2005-01-11 14:51 ` Some groundwork for Unicode in Zle Oliver Kiddle
2005-01-11 14:54   ` Mads Martin Joergensen
2005-01-11 14:56     ` Mads Martin Joergensen
2005-01-11 15:30   ` Peter Stephenson
2005-01-11 16:31     ` Bart Schaefer
2005-01-11 15:09 ` DervishD [this message]
2005-01-11 16:27 ` Bart Schaefer
2005-01-11 16:35   ` Vin Shelton
2005-01-11 16:49   ` DervishD
2005-01-14 15:54 François-Xavier Coudert
2005-01-14 16:06 ` Clint Adams
2005-01-14 16:20   ` François-Xavier Coudert
2005-01-14 16:49 ` Peter Stephenson

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=20050111150940.GC3445@DervishD \
    --to=zsh@dervishd.net \
    --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).