Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking possible to extract string using UTF8 #6

Open
PhoneixS opened this issue Feb 25, 2016 · 0 comments
Open

Checking possible to extract string using UTF8 #6

PhoneixS opened this issue Feb 25, 2016 · 0 comments

Comments

@PhoneixS
Copy link

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant