Skip to content

Cannot detect native charset for locale #36

@pabloab

Description

@pabloab

enca 1.19

I have a pretty common setup:

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=es_AR.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=es_AR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=es_AR.UTF-8
LC_NAME=es_AR.UTF-8
LC_ADDRESS=es_AR.UTF-8
LC_TELEPHONE=es_AR.UTF-8
LC_MEASUREMENT=es_AR.UTF-8
LC_IDENTIFICATION=es_AR.UTF-8
LC_ALL=

But

enconv: Cannot detect native charset for locale __.
You have to use the `-x' option or the DEFAULT_CHARSET environment variable to set the target encoding manually.

From man:

will tell you which encoding file FILE uses (without changing it), and
              enconv FILE
       will  convert  file  FILE  to  your  locale  native encoding

I don't know what environment variable is reading, it seems should read one of those, for e.g. LANG.

Also: The manual is wrong: -L parameter is mandatory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions