View | Details | Raw Unified | Return to bug 26817
Collapse All | Expand All

(-)a/mysqld.init (-12 / +6 lines)
Lines 38-56 charset() Link Here
38
		|| echo "Unable to find charset: $CHSET"
38
		|| echo "Unable to find charset: $CHSET"
39
	fi
39
	fi
40
	unset LANG LANGUAGE LC_ALL
40
	unset LANG LANGUAGE LC_ALL
41
	default_charset="$(HOME=/var/empty . /etc/profile.d/lang.sh && locale |sed -ne 's/^LC_COLLATE="\?[^".]\+\.\([^"]\+\)"\?$/\1/p')"
41
	default_charset="$(HOME=/var/empty . /etc/profile.d/lang.sh && locale \
42
		| sed -ne 's/^LC_COLLATE="\?[^".]\+\.\([^"]\+\)"\?$/\1/p' \
43
		| tr '[:upper:]' '[:lower:]' \
44
		| tr -d '-')"
42
	case "$default_charset" in
45
	case "$default_charset" in
43
		CP1251)
46
		cp1251|koi8r|koi8u|utf8)
44
			CHSET=cp1251
47
			CHSET="$default_charset"
45
			;;
46
		KOI8-R)
47
			CHSET=koi8r
48
			;;
49
		KOI8-U)
50
			CHSET=koi8u
51
			;;
52
		UTF-8)
53
			CHSET=utf8
54
			;;
48
			;;
55
		*)
49
		*)
56
			echo "Unable to find proper charset from system locale, setting 'utf8'."
50
			echo "Unable to find proper charset from system locale, setting 'utf8'."

Return to bug 26817