Re: [hackers] [st][patch] replace utf8strchr with wcschr

From: Antenore Gatta <antenore_AT_simbiosi.org>
Date: Thu, 14 Mar 2019 09:28:08 +0100

Hi Lauri, all,

While I'd love having this patch applied, I've to agree with
Hiltjo

On Thu, 14 Mar 2019 09:57:02 +0200
Lauri Tirkkonen <lotheac_AT_iki.fi> wrote:

>
> Could you explain what it is that you don't like about wchar_t?
>

Probably because wchar_t it's not portable at all, quoting the ISO/IEC
10646:2003 Unicode standard 4.0 [0]

> The width of wchar_t is compiler-specific and can be as small as 8
> bits. Consequently, programs that need to be portable across any C or
> C++ compiler should not use wchar_t for storing Unicode text. The
> wchar_t type is intended for storing compiler-defined wide
> characters, which may be Unicode characters in some compilers.

I don't know for sure the reasons of Hiltjo, but this one it's quite a
good one to refrain from applying it.

Maybe you can find an alternative way to deal with it or propose the
patch in the wiki (or both)?

As I don't have compilers constraint I will surely try and use it,
thanks!

[0]:https://www.iso.org/standard/39921.html

--
Antenore Gatta
Received on Thu Mar 14 2019 - 09:28:08 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 14 2019 - 09:36:23 CET