Initialize hs_init with UTF8 encoded arguments on Windows.
authorAndreas Klebinger <klebinger.andreas@gmx.at>
Thu, 27 Jul 2017 17:16:09 +0000 (18:16 +0100)
committerTamar Christina <tamar@zhox.com>
Thu, 27 Jul 2017 20:16:02 +0000 (21:16 +0100)
commit7af0b906116e13fbd90f43f2f6c6b826df2dca77
tree4da8912ab0408e22b119098dd64260b32e935bd9
parent791947db6db32ef7d4772a821a0823e558e3c05b
Initialize hs_init with UTF8 encoded arguments on Windows.

Summary:
Get utf8 encoded arguments before we call hs_init and use them
instead of ignoring hs_init arguments. This reduces differing
behaviour of the RTS between windows and linux and simplifies
the code involved.

A few testcases were changed to expect the same result on windows
as on linux after the changes.

This fixes #13940.

Test Plan: ./validate

Reviewers: austin, hvr, bgamari, erikd, simonmar, Phyx

Subscribers: Phyx, rwbarton, thomie

GHC Trac Issues: #13940

Differential Revision: https://phabricator.haskell.org/D3739
12 files changed:
docs/users_guide/ffi-chap.rst
includes/Rts.h
libraries/base/GHC/Environment.hs
libraries/base/GHC/IO/Encoding.hs
libraries/base/System/Environment.hs
rts/RtsFlags.c
rts/RtsFlags.h
rts/RtsMain.c
rts/RtsStartup.c
rts/RtsSymbols.c
testsuite/tests/ghci.debugger/scripts/all.T
testsuite/tests/rts/T6006.stdout-mingw32