Changed counting with -m to support locale

This commit is contained in:
mboelen 2015-04-02 13:29:18 +02:00
parent d2175e833d
commit d5bdde7a93
1 changed files with 2 additions and 2 deletions

View File

@ -215,8 +215,8 @@
if [ ! "${TEXT}" = "" ]; then
# Show warnings always, and other messages if no quiet is being used
if [ ${QUIET} -eq 0 -o "${RESULT}" = "WARNING" ]; then
# Display
LINESIZE=`echo "${TEXT}" | wc -c | tr -d ' '`
# Display (counting with -m instead of -c, to support language locale)
LINESIZE=`echo "${TEXT}" | wc -m | tr -d ' '`
if [ ${INDENT} -gt 0 ]; then SPACES=`expr 62 - ${INDENT} - ${LINESIZE}`; fi
if [ ${CRONJOB} -eq 0 ]; then
# Check if we already have already discovered a proper echo command tool. It not, set it default to 'echo'.