Skip to content
  • Michael Snoyman's avatar
    dedc2f3d
    Dump files always use UTF8 encoding #10762 · dedc2f3d
    Michael Snoyman authored and Ben Gamari's avatar Ben Gamari committed
    When the Windows codepage or *nix LANG variable is something besides
    UTF-8, dumping to file can cause GHC to exit currently. This changes the
    output encoding for files to match the defined input encoding for
    Haskell source code (UTF-8), making it easier for users and build tools
    to capture this output.
    
    Test Plan:
    Create a Haskell source file with non-Latin characters for identifier
    names and
    compile with:
    
    LANG=C ghc -ddump-to-file -ddump-hi filename.hs -fforce-recomp
    
    Without this patch, it will fail. With this patch, it succeeds
    
    Reviewers: austin, rwbarton, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1151
    
    GHC Trac Issues: #10762
    dedc2f3d
    Dump files always use UTF8 encoding #10762
    Michael Snoyman authored and Ben Gamari's avatar Ben Gamari committed
    When the Windows codepage or *nix LANG variable is something besides
    UTF-8, dumping to file can cause GHC to exit currently. This changes the
    output encoding for files to match the defined input encoding for
    Haskell source code (UTF-8), making it easier for users and build tools
    to capture this output.
    
    Test Plan:
    Create a Haskell source file with non-Latin characters for identifier
    names and
    compile with:
    
    LANG=C ghc -ddump-to-file -ddump-hi filename.hs -fforce-recomp
    
    Without this patch, it will fail. With this patch, it succeeds
    
    Reviewers: austin, rwbarton, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1151
    
    GHC Trac Issues: #10762
Loading