Skip to content

Checking possible to extract string using UTF8 #6

@PhoneixS

Description

@PhoneixS

When checking if strings can be extracted by xgettext it do it without --from-code option so it assume is ASCII.

Although string must be in English this don't mean that you can't have other non-ascii characters (for example in names) and I think is safer to call it assuming is encoded in UTF-8.

So this code:

check_xgettext_ok()
{
    if [ "$(which xgettext)" != "" ]
    then
        s_echo "Checking possible to extract string"

        if xgettext -L Shell "/tmp/script" &> /dev/null
        then
            s_ok 3
        else
            s_err 3
        fi
    fi
}

should be writted as:

check_xgettext_ok()
{
    if [ "$(which xgettext)" != "" ]
    then
        s_echo "Checking possible to extract string"

        if xgettext -L Shell --from-code=UTF-8 "/tmp/script" &> /dev/null
        then
            s_ok 3
        else
            s_err 3
        fi
    fi
}

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