Re: virt-manager: "locale.Error: unsupported locale setting" error and workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Cole!

This issue is not happening with me. It is happening with another user here.
Today, he sent to me the message:
Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.


Sorry, I'm not want to say that my patch really fix something, because virt-manager works
fine without locale.setlocale(locale.LC_ALL, ''). But as described into python documentation:

"getdefaultlocale(): According to POSIX, a program which has not called setlocale(LC_ALL, '')
runs using the portable 'C' locale. Calling setlocale(LC_ALL, '') lets it use the default locale as
defined by the LANG variable. Since we do not want to interfere with the current locale
setting we thus emulate the behavior in the way described above
."

So, the intention is to avoid that Gtk uses the portable 'C' locale changing the "pass" into
locale.setlocale(locale.LC_ALL, locale.getdefaultlocale()) since getdefaultlocale() will return
the content of LANG. Well, as we see today it is not working even if we set using the
getdefaultlocale() when glibc-common has a locale bug. Gtk is still using 'C' locale.

Strange.
_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux