Treat strings returned from primitives as UTF-8 coded.
authorChris Hanson <org/chris-hanson/cph>
Wed, 8 May 2019 06:50:48 +0000 (23:50 -0700)
committerChris Hanson <org/chris-hanson/cph>
Wed, 8 May 2019 06:50:48 +0000 (23:50 -0700)
commita629b61e5ea21f6a23c0ec4d68ccbca64f993845
tree31352b582f8ac64dbb365ff72b4dd8e1559d19ff
parent884c387f431df4e5db825426477a6931bdb3adcb
Treat strings returned from primitives as UTF-8 coded.

In particular, make sure that filenames are treated this way, because this is
normal for modern unix systems.  This change mostly affects filenames, but also
environment variables and command-line strings.

This is necessary because strings passed to primitives are converted to UTF-8
bytevectors.  Otherwise, a non-ASCII filename returned by a primitive won't be
converted back to the same bytes when passed to another primitive.
src/runtime/command-line.scm
src/runtime/os-primitives.scm
src/runtime/primitive-io.scm
src/runtime/runtime.pkg
src/runtime/savres.scm
src/runtime/sfile.scm
src/runtime/string.scm
src/runtime/unxprm.scm
src/runtime/wrkdir.scm