Re: C11: should we use char32_t for unicode code points?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: C11: should we use char32_t for unicode code points?
Date: 2025-10-28 20:03:17
Message-ID: 1f4f9efd4e89b2620685b9a6406d832fa16321f2.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2025-10-28 at 19:45 +0100, Peter Eisentraut wrote:
> This could be improved a bit. The reason for some of these
> conditionals
> is not clear.  Like, what does __cplusplus have to do with this?  I
> think it would be more correct to write a configure/meson check for
> the
> actual types rather than depend indirectly on a header check.

Fixed, thank you.

> The checks for __STDC_UTF_16__ and __STDC_UTF_32__ can be removed, as
> was discussed elsewhere, since we don't use any standard library
> functions that make use of these facts, and the need goes away with
> C23
> anyway.

Removed.

I also made the pg_config.h.in changes and ran autoconf.

Regards,
Jeff Davis

Attachment Content-Type Size
v3-0001-Use-C11-char16_t-and-char32_t-for-Unicode-code-po.patch text/x-patch 59.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2025-10-28 20:03:33 Re: C11: should we use char32_t for unicode code points?
Previous Message David E. Wheeler 2025-10-28 19:51:55 Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part