GNU bug report logs -
#56413
[PATCH 1/1] scm_i_utf8_string_hash: compute u8 chars not bytes
Previous Next
Reported by: Rob Browning <rlb <at> defaultvalue.org>
Date: Wed, 6 Jul 2022 01:25:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 56413 <at> debbugs.gnu.org (full text, mbox):
Rob Browning <rlb <at> defaultvalue.org> 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
This bug report was last modified 2 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.