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

From: "Robert I Nilsson" <robert(dot)i(dot)nilsson(at)callclue(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: [PATCH] Fix incorrect Unicode code point in saslprep.c comment
Date: 2026-11-09 11:09:28
Message-ID: 78b5ff89-2a25-4675-a3df-e6c7da70faf5@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-Fix-incorrect-Unicode-code-point-in-SASLprep.patch text/x-diff 1009 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-11-09 11:16:11 Re: Clarify wait versus poll behavior in ExecAppendAsyncEventWait
Previous Message Xuneng Zhou 2026-11-09 10:49:41 Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE