Hi Harm,
In your code, isn't it just slightly odd breaking scheme for a function across several calls to #define in lilypond? While that seems to be possible (although strangely I can't get your code to compile, with unhelpful error messages, but never mind that), would one not write a single function for this test? Doing that works fine with 2.19.51 and its guile 1.8. This handles the Chinese filename just fine. Also not clear why you write format and then also (system format...).
Andrew
== snip
\version "2.19.51"
dirfunc =
#(define-void-function (directory)
(string?)
(let* ((d (opendir directory)))
(let loop ((dir-entry (readdir d)))
(if (not (eof-object? dir-entry))
(begin
(format #t "~a: type: ~a\n" dir-entry (stat:type (stat dir-entry)))
(loop (readdir d))
)))
(closedir d)))
\dirfunc "."
== snip