mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
glibc: allow to use UTF-8 locales only (enable with LOCALE_UTF8_ONLY=1)
This code limits generation of locales to UTF-8 ones only. Other encodings will be ignored. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3308 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -212,10 +212,13 @@ python package_do_split_gconvs () {
|
|||||||
dot_re = re.compile("(.*)\.(.*)")
|
dot_re = re.compile("(.*)\.(.*)")
|
||||||
|
|
||||||
# Collate the locales by base and encoding
|
# Collate the locales by base and encoding
|
||||||
|
utf8_only = int(bb.data.getVar('LOCALE_UTF8_ONLY', d, 1) or 0)
|
||||||
encodings = {}
|
encodings = {}
|
||||||
for l in supported:
|
for l in supported:
|
||||||
l = l[:-1]
|
l = l[:-1]
|
||||||
(locale, charset) = l.split(" ")
|
(locale, charset) = l.split(" ")
|
||||||
|
if utf8_only and charset != 'UTF-8':
|
||||||
|
continue
|
||||||
m = dot_re.match(locale)
|
m = dot_re.match(locale)
|
||||||
if m:
|
if m:
|
||||||
locale = m.group(1)
|
locale = m.group(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user