Fix part of #3398: pretty-printing always goes via the I/O library encoding That is, unless we're printing in LeftMode, where we bypass encoding for speed.  This is safe, because LeftMode is used for outputting C or asm, where everyting is Z-encoded and hence ASCII.
Fix part of #3398: pretty-printing always goes via the I/O library encoding
That is, unless we're printing in LeftMode, where we bypass encoding
for speed.  This is safe, because LeftMode is used for outputting C or
asm, where everyting is Z-encoded and hence ASCII.

Error messages and other compiler output containing Unicode will now
appear correctly according to the locale settings.

ilyasergey/GHC-XAppFix,ryantm/ghc,vikraman/ghc,green-haskell/ghc,spacekitteh/smcghc,fmthoma/ghc,tibbe/ghc,fmthoma/ghc,ryantm/ghc,green-haskell/ghc,lukexi/ghc,urbanslug/ghc,nathyong/microghc-ghc,shlevy/ghc,christiaanb/ghc,mettekou/ghc,nomeata/ghc,acowley/ghc,green-haskell/ghc,urbanslug/ghc,TomMD/ghc,nathyong/microghc-ghc,ezyang/ghc,mcmaniac/ghc,ezyang/ghc,tjakway/ghcjvm,GaloisInc/halvm-ghc,urbanslug/ghc,ezyang/ghc,gcampax/ghc,nushio3/ghc,lukexi/ghc-7.8-arm64,ghc-android/ghc,oldmanmike/ghc,wxwxwwxxx/ghc,jstolarek/ghc,elieux/ghc,snoyberg/ghc,ghc-android/ghc,ekmett/ghc,wxwxwwxxx/ghc,hferreiro/replay,christiaanb/ghc,gridaphobe/ghc,oldmanmike/ghc,ezyang/ghc,ml9951/ghc,oldmanmike/ghc,vTurbine/ghc,da-x/ghc,nomeata/ghc,siddhanathan/ghc,nkaretnikov/ghc,mettekou/ghc,spacekitteh/smcghc,elieux/ghc,shlevy/ghc,siddhanathan/ghc,sgillespie/ghc,siddhanathan/ghc,mcschroeder/ghc,da-x/ghc,mfine/ghc,AlexanderPankiv/ghc,hferreiro/replay,siddhanathan/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,vikraman/ghc,tjakway/ghcjvm,holzensp/ghc,christiaanb/ghc,AlexanderPankiv/ghc,gcampax/ghc,snoyberg/ghc,ghc-android/ghc,gcampax/ghc,sdiehl/ghc,TomMD/ghc,oldmanmike/ghc,da-x/ghc,mcmaniac/ghc,mcschroeder/ghc,spacekitteh/smcghc,urbanslug/ghc,anton-dessiatov/ghc,mcschroeder/ghc,AlexanderPankiv/ghc,ezyang/ghc,mettekou/ghc,wxwxwwxxx/ghc,mettekou/ghc,vTurbine/ghc,ekmett/ghc,bitemyapp/ghc,mfine/ghc,jstolarek/ghc,mfine/ghc,nomeata/ghc,vTurbine/ghc,ezyang/ghc,gridaphobe/ghc,forked-upstream-packages-for-ghcjs/ghc,snoyberg/ghc,sgillespie/ghc,tjakway/ghcjvm,olsner/ghc,nathyong/microghc-ghc,forked-upstream-packages-for-ghcjs/ghc,urbanslug/ghc,ekmett/ghc,spacekitteh/smcghc,lukexi/ghc,forked-upstream-packages-for-ghcjs/ghc,vikraman/ghc,holzensp/ghc,hferreiro/replay,gridaphobe/ghc,oldmanmike/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,elieux/ghc,mcschroeder/ghc,gcampax/ghc,nkaretnikov/ghc,mcmaniac/ghc,frantisekfarka/ghc-dsi,olsner/ghc,hferreiro/replay,ml9951/ghc,mcschroeder/ghc,gridaphobe/ghc,christiaanb/ghc,vikraman/ghc,nathyong/microghc-ghc,vTurbine/ghc,wxwxwwxxx/ghc,ryantm/ghc,siddhanathan/ghc,lukexi/ghc,hferreiro/replay,da-x/ghc,lukexi/ghc-7.8-arm64,mfine/ghc,nushio3/ghc,ryantm/ghc,olsner/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,forked-upstream-packages-for-ghcjs/ghc,jstolarek/ghc,holzensp/ghc,gridaphobe/ghc,snoyberg/ghc,sgillespie/ghc,TomMD/ghc,TomMD/ghc,urbanslug/ghc,hferreiro/replay,oldmanmike/ghc,green-haskell/ghc,ml9951/ghc,wxwxwwxxx/ghc,da-x/ghc,anton-dessiatov/ghc,AlexanderPankiv/ghc,nkaretnikov/ghc,spacekitteh/smcghc,ml9951/ghc,nomeata/ghc,ml9951/ghc,ghc-android/ghc,tibbe/ghc,ml9951/ghc,urbanslug/ghc,acowley/ghc,mettekou/ghc,forked-upstream-packages-for-ghcjs/ghc,GaloisInc/halvm-ghc,ghc-android/ghc,shlevy/ghc,elieux/ghc,christiaanb/ghc,TomMD/ghc,ghc-android/ghc,green-haskell/ghc,tibbe/ghc,acowley/ghc,elieux/ghc,fmthoma/ghc,frantisekfarka/ghc-dsi,nathyong/microghc-ghc,gcampax/ghc,mfine/ghc,shlevy/ghc,lukexi/ghc-7.8-arm64,acowley/ghc,frantisekfarka/ghc-dsi,sdiehl/ghc,mettekou/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,lukexi/ghc-7.8-arm64,olsner/ghc,anton-dessiatov/ghc,AlexanderPankiv/ghc,TomMD/ghc,gcampax/ghc,ml9951/ghc,da-x/ghc,ekmett/ghc,nkaretnikov/ghc,fmthoma/ghc,mcschroeder/ghc,ilyasergey/GHC-XAppFix,snoyberg/ghc,holzensp/ghc,nkaretnikov/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,sdiehl/ghc,ryantm/ghc,mcschroeder/ghc,tibbe/ghc,shlevy/ghc,siddhanathan/ghc,sdiehl/ghc,lukexi/ghc,snoyberg/ghc,nathyong/microghc-ghc,olsner/ghc,gcampax/ghc,mfine/ghc,shlevy/ghc,sdiehl/ghc,mfine/ghc,fmthoma/ghc,ekmett/ghc,acowley/ghc,sgillespie/ghc,ilyasergey/GHC-XAppFix,gridaphobe/ghc,christiaanb/ghc,christiaanb/ghc,elieux/ghc,siddhanathan/ghc,olsner/ghc,gridaphobe/ghc,frantisekfarka/ghc-dsi,nkaretnikov/ghc,vTurbine/ghc,nushio3/ghc,GaloisInc/halvm-ghc,frantisekfarka/ghc-dsi,mcmaniac/ghc,holzensp/ghc,vTurbine/ghc,acowley/ghc,TomMD/ghc,nushio3/ghc,bitemyapp/ghc,hferreiro/replay,forked-upstream-packages-for-ghcjs/ghc,sdiehl/ghc,mcmaniac/ghc,snoyberg/ghc,fmthoma/ghc,lukexi/ghc-7.8-arm64,acowley/ghc,elieux/ghc,nkaretnikov/ghc,fmthoma/ghc,GaloisInc/halvm-ghc,tibbe/ghc,ml9951/ghc,ghc-android/ghc,nushio3/ghc,AlexanderPankiv/ghc,shlevy/ghc,bitemyapp/ghc,ezyang/ghc,da-x/ghc,AlexanderPankiv/ghc,nathyong/microghc-ghc,bitemyapp/ghc,wxwxwwxxx/ghc,bitemyapp/ghc,vikraman/ghc,nushio3/ghc,nushio3/ghc,anton-dessiatov/ghc,vikraman/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,jstolarek/ghc,nomeata/ghc,vTurbine/ghc,olsner/ghc,mettekou/ghc,jstolarek/ghc,GaloisInc/halvm-ghc,ilyasergey/GHC-XAppFix,vikraman/ghc,lukexi/ghc,oldmanmike/ghc,tjakway/ghcjvm,tjakway/ghcjvm,sdiehl/ghc