Subject: Re: bug#56413: [PATCH 1/1] scm_i_utf8_string_hash: compute u8 chars not bytes

From: Rob Browning <[email-masked]>
Date: Mon, 07 Nov 2022 23:05:34 -0600

Rob Browning <[email-masked]> writes:

> OK, so unfortunately I don't actually recall how I came up with that
> number, but I can start over with some canonical approach to compute the
> value if we like.

I hacked up hash.c to let me call wide_string_hash() directly and
printed the hash for wchar_t {0x3A0, 0x3B5, 0x3C1, 0x3AF}, which should
be what the optimized utf-8 code is consuming.

I saw 4029223418961680680.  I double-checked via (symbol-hash
'Περί) from the terminal, and that returned the same value.

Oh, and unless I'm missing something, I remembered why we may need to
keep the standalone C test program -- there's no straightforward way to
call scm_from_utf8_symbol() from scheme?

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4