nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug reported regarding Unicode handling in email address


From: Ken Hornstein
Subject: Re: Bug reported regarding Unicode handling in email address
Date: Wed, 02 Jun 2021 08:15:40 -0400

>The <ctype.h> macros are just fundamentally broken in any locale that
>has multibyte characters: you cannot squeeze a multibyte character
>into an input that is supposed to be either an "unsigned char" or EOF.
>Vendors can choose either to violate the spec (say, by interpreting
>the "int" input as a Unicode codepoint) or to produce useless results.

It's worth pointing out that the official prototype for the ctype macros
all say they take "int" as an argument, and POSIX says they take as
an argument a "character".  So interpreting that argument as a Unicode
codepoint (assuming you're currently in a Unicode locale) is, from my
reading, within the spec.

But it sounds like to me that everyone is on board with sprinkling in
some isascii() calls there where it makes sense.

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]