From: random832@fastmail.com (Random832)
Subject: [TUHS] Character sets
Date: Sun, 27 Mar 2016 21:20:32 -0400 [thread overview]
Message-ID: <1459128032.3939182.561077874.021FA249@webmail.messagingengine.com> (raw)
In-Reply-To: <20160327233049.GA11617@mercury.ccil.org>
On Sun, Mar 27, 2016, at 19:30, John Cowan wrote:
> > > while (*c && *c++ != " ");
>
> That particular piece of code still works if the encoding is UTF-8.
Sure it does, but replace that != " " with !isblank(*c), and it doesn't
work anymore since it ignores multibyte characters. Often you don't
care, but you've got to remember to set LC_ALL=C when running grep etc
on large data sets or it will be much slower, since \w and \s care about
multibyte characters (as does case-insensitive matching, etc).
next prev parent reply other threads:[~2016-03-28 1:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.169.1459059516.15972.tuhs@minnie.tuhs.org>
2016-03-27 10:09 ` [TUHS] Character sets (was: Command-line options) Johnny Billquist
2016-03-27 11:29 ` John Cowan
2016-03-27 11:47 ` [TUHS] Character sets Johnny Billquist
2016-03-27 21:49 ` Greg 'groggy' Lehey
2016-03-27 21:53 ` Johnny Billquist
2016-03-27 21:59 ` Greg 'groggy' Lehey
2016-03-27 22:19 ` Johnny Billquist
2016-03-27 22:21 ` Charles Anthony
2016-03-27 23:23 ` Dave Horsfall
2016-03-28 0:20 ` John Cowan
2016-03-28 1:02 ` Dave Horsfall
2016-03-28 0:18 ` Johnny Billquist
2016-03-27 23:30 ` John Cowan
2016-03-27 23:56 ` Johnny Billquist
2016-03-28 1:54 ` John Cowan
2016-03-28 3:27 ` Steve Nickolas
2016-03-28 1:20 ` Random832 [this message]
2016-03-28 1:58 ` John Cowan
2016-03-28 5:12 ` Random832
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=1459128032.3939182.561077874.021FA249@webmail.messagingengine.com \
--to=random832@fastmail.com \
/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.
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).