[PATCH] Fix incorrect Unicode code point in saslprep.c comment

Started by Robert I Nilsson13 days ago2 messageshackers
Jump to latest
#1Robert I Nilsson
robert.i.nilsson@callclue.com

Hi,

While working on a new client (just a hobby, won't be big and professional like node-postgres), I noticed a small error in a comment in src/common/saslprep.c.

The comment for non_ascii_space_ranges states that non-ASCII space characters are mapped to U+00A0:

* These are all mapped to the ASCII space character (U+00A0).

However, the actual implementation maps them to 0x0020 (ASCII SPACE):

if (IS_CODE_IN_TABLE(code, non_ascii_space_ranges))
input_chars[count++] = 0x0020;

The attached patch corrects the comment to refer to U+0020:

- * These are all mapped to the ASCII space character (U+00A0).
+ * These are all mapped to the ASCII space character (U+0020).

The patch is against master and changes only a single bit in a comment, with no impact on functionality.

Best regards,
Robert I Nilsson

Attachments:

t258354_1
v1-0001-Fix-incorrect-Unicode-code-point-in-SASLprep.patchtext/x-diff; name="=?UTF-8?Q?v1-0001-Fix-incorrect-Unicode-code-point-in-SASLprep.patch?="Download+1-2
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Robert I Nilsson (#1)
Re: [PATCH] Fix incorrect Unicode code point in saslprep.c comment

On 9 Nov 2026, at 12:09, Robert I Nilsson <robert.i.nilsson@callclue.com> wrote:

While working on a new client (just a hobby, won't be big and professional like node-postgres),

Cool!

I noticed a small error in a comment in src/common/saslprep.c.

Thanks, fixed.

--
Daniel Gustafsson