Skip to content

Collating Symbol [. .] Error #322

Description

@e-kwsm

revision: 628d320

For instance, Hungarian has a trigraph dzs and digraphs such as cs, dz, and so forth.

uutils does not raise error when a collation character is invalid:

$ export LANG=en_US.UTF-8
$ <<< dzs gnused -e 's/[[.dzs.]]/@/'
gnused: -e expression #1, char 14: Invalid collation character
$ <<< dzs bsdsed -e 's/[[.dzs.]]/@/'
bsdsed: 1: "s/[[.dzs.]]/@/
": RE error: Invalid collation character
$ <<< dzs ./target/debug/sed -e 's/[[.dzs.]]/@/'
@zs
$ <<< x ./target/debug/sed -e 's/[[.ThisMustBeInvalid.]]/@/'
@

and does not properly handle it under Hungarian:

$ export LANG=hu_HU.UTF-8
$ <<< dzs gnused -e 's/[[.dzs.]]/@/'
@
$ <<< dzs bsdsed -e 's/[[.dzs.]]/@/'
@
$ <<< dzs ./target/debug/sed -e 's/[[.dzs.]]/@/'
@zs

https://pubs.opengroup.org/onlinepubs/7908799/xbd/re.html#tag_007_003_005

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