Skip to content

ascii_binder does not respect the system locale #177

@fzdarsky

Description

@fzdarsky

When running asciibinder build (v1.0.1) against content using UTF8 encoding, the build fails with the error

Error: Could not generate docs:
Encoding::InvalidByteSequenceError: /path/to/document_with_utf8.html.erb is not valid US-ASCII at
[...]

When running it with LC_ALL=C.UTF-8 asciibinder build it builds correctly.

The system in question (a fresh RHEL8.7 install, but also happens on OSX12.6.1) has a locale of

LANG=en_US.UTF-8
LC_CTYPE=UTF-8
[...]
LC_ALL=

When the override LC_ALL is empty (as is normal), the application should have fallen back to respect LC_CTYPE, then LANG.

It would be great to document this behaviour until the issue is fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions