On Wed, 2026-05-13 at 14:13 +0000, Mike Gran wrote:
>
> > Thank you for your quick response, however:
>
> > I don't understand how this can be, the build of Denemo in Debian
>
> > (version)
> > -> 2.2.7
>
> > and
>
> > (number->string (string-length "𝅬"))
>
> You're right, and I'm totally wrong about that. It around 2009 that
> unicode started
> to work, so that was 2.0.x not 3.0.x.
>
> Maybe you just need to call setlocale to explicitly set a utf-8
> locale?
I did try
(set-port-encoding! (current-input-port) "UTF-8")
(set-port-encoding! (current-output-port) "UTF-8")
(string-length "𝅬")
but this
but I confess I'm not sure what input port is involved - the part of
Denemo that offers a Guile interpreter interface uses a GTK widget to
input the Scheme text from the user and passes this as the parameter
"script" to this function:
scm_internal_catch (SCM_BOOL_T, (scm_t_catch_body) scm_c_eval_string,
(void *) script,
(scm_t_catch_handler) standard_handler,
(void *) script);
And I see that there is this during initialization of Denemo:
const char prog[] = "(catch #t (lambda () (setlocale LC_ALL \"\")) (lambda
_(display \"Locale not supported by the C library. Falling back to default
\\\"C\\\" locale.\\n\"(current-error-port))))";
scm_c_eval_string (prog);
results in the message saying it is falling back to the default C locale.
I'm lost!
Richard