Fix naming of the native latin1 encodings
Fix naming of the native latin1 encodings

textEncodingName is notjust a string, it must be a valid input for
mkTextEncoding, as stated in libraries/base/GHC/IO/Encoding/Types.hs.

Test Plan:
A working latin1 locale is required on the system.  Reason: ghc's
initial locale encoding defaults to ASCII, if either an unknown locale
or unknown charset is used.  For the bug to show up, ghc must start up
using the latin1 encoding.

From main directory in ghc do:
$ ./configure && make clean && make boot && make inplace/bin/ghc-stage2
$ LC_CTYPE="de_DE.ISO-8859-1" ./inplace/bin/ghc-stage2

Before the patch, the last line leads to the exception thrown:
ghc-stage2: mkTextEncoding: does not exist (unknown
encoding:ISO8859-1(checked)//TRANSLIT)

After the patch, ghc-stage2 prints a short usage summary as expected.
Moreover,
$ make test TEST=encoding005
continues to  pass after the patch.

Reviewers: austin, hvr, rwbarton, bgamari

Reviewed By: bgamari

Subscribers: mpickering, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D2667

olsner/ghc,shlevy/ghc,ezyang/ghc,mettekou/ghc,shlevy/ghc,olsner/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,olsner/ghc,ezyang/ghc,shlevy/ghc,ezyang/ghc,sdiehl/ghc,shlevy/ghc,ezyang/ghc,olsner/ghc,shlevy/ghc,mettekou/ghc,olsner/ghc,mettekou/ghc,mettekou/ghc,ezyang/ghc,mettekou/ghc,mettekou/ghc,sdiehl/ghc,shlevy/ghc,ezyang/ghc,mettekou/ghc,olsner/ghc,ezyang/ghc,shlevy/ghc,olsner/ghc,sdiehl/ghc,sdiehl/ghc