Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Question about mb_metastrlen
- X-seq: zsh-workers 36976
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Question about mb_metastrlen
- Date: Tue, 27 Oct 2015 11:34:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=iHpDoMPCcruxfDUbwcM4moY7elY6u3ewCrVGDLVL540=; b=wMuyRgBXFrJYFZqHudNP4ij1VS5/ovHJaOIff3gitdKaloBm9r0wwvVCDgHAMXc/+Q SR5/B00sw6FCiaZ5MVodgGCJcvuGu95APkGMooD8AdqMsWKSqcBLWPRKB0f80xmfqUqd HKY2U3dKuQ9IH4ikow5CAfblH+sgSIIzb9aueCXZvsCAubWmelKRg7HJfdEzD7vXbRg2 AnK9lKKEAcPX99yOlfElq5C//ApszUUptn4E2l1COScZ5BBnJbY42OHD5uXX7yUdWB0L zlJQIZ4UeTT6hxH+D8IEzWjHAfPqpvcmj0KUn/aQLyJ81nlVeT8UGzvaMSLG37UWYzFz SR+g==
- In-reply-to: <20151027091026.5197b79f@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBM070eO+zb8GEUjiuWvksBEYVQRmcQRr0CHYp_xifVAg@mail.gmail.com> <20151027091026.5197b79f@pwslap01u.europe.root.pri>
On 27 October 2015 at 10:10, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Tue, 27 Oct 2015 09:31:02 +0100
> The function you're talking about is for a string length, not a
> character length. num_in_char counts the number of trailing bytes that
> didn't form a wide character. Each will be treated as a single byte.
> So each counts 1 for the length of the string.
There is the condition:
if (ret == MB_INVALID) {
Isn't it that if there are many trailing bytes that do not form a
character, they will be catched into MB_INVALID, and only last
"character" can stay as not yet complete?
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author