Skip to content

During Manual Installation, an encoding error: commitAndReleaseBuffer: invalid argument (invalid character) #1957

@freckletonj

Description

@freckletonj

TL;DR : en_US.UTF-8 vs C.UTF-8

I've solved this as being an error of the environment's LANG encoding, but it'd be nice if this were documented.

Problem:

$ stack ./install.hs hls-8.8.4
<<<...>>>
ghc-lib                          > Registering library for ghc-lib-8.10.4.20210206..
<stderr>: commitAndReleaseBuffer: invalid argument (invalid character)

<stderr>: commitAndReleaseBuffer: invalid argument (invalid character)
Progress 8/162

Solution:

$ echo $LANG
en_US.UTF-8

$ LANG=C.UTF-8 stack ./install.hs hls-8.8.4

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

$ haskell-language-server --probe-tools
haskell-language-server version: 1.2.0.0 (GHC: 8.8.4) (PATH: ~/.local/bin/haskell-language-server) (GIT hash: 0d9ba1548a15c427963cde7f1635316c1d5ea179)
Tool versions found on the $PATH
cabal:		3.2.0.0
stack:		2.3.3
ghc:		8.8.3

Which OS do you use: Debian

Which lsp-client do you use: emacs

Metadata

Metadata

Assignees

No one assigned

    Labels

    build tool: stackcan-workaroundtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions