Project

General

Profile

« Previous | Next » 

Revision 10214

bugfix: lib/sh/util.sh: sed: unset LANG to avoid "illegal byte sequence" errors on invalid UTF-8 for LANG=*.UTF-8. these occur e.g. with MySQL data that is in Latin-1.

View differences:

lib/sh/util.sh
251 251
fi # load new aliases
252 252
if self_being_included; then
253 253

  
254
sed() { sed_cmd "$@"; }
254
sed() { local LANG; unset LANG; sed_cmd "$@"; }
255
# LANG: avoid "illegal byte sequence" errors on invalid UTF-8 for LANG=*.UTF-8
255 256

  
256 257
rtrim() { log+ 3; sed 's/[[:space:]]+$//' <<<"$1"; }
257 258

  

Also available in: Unified diff