Default now UTF-8 on

This has been discussed recently in the Wary feedback thread. Zigbert reported a problem with Viewnior for non-UTF8 locale. Zigbert also asked me why I set the default in Puppy to non-UTF8, and I replied that there was a speed hit with UTF8.

Yes, there is a performance hit on applications, but looking at my notes I have found another reason. At first boot, the 'localedef' application is run (see /usr/sbin/chooselocale, called from /etc/rc.d/rc.country) to generate the 'en_US' locale. Back when I was experimenting with UTF8, I did set the default to 'en_US.utf8", but we found that 'localedef' hangs in 64MB PCs.

Unfortunately certain developers don't consider that their application might need to run in such an old PC. Ditto the 'depmod' utility in the module init tools package.

Anyway, I have now set the default in /etc/profile to 'LANG=en_US.utf8' and the first-boot dialog window that offers you a choice of locale now defaults to UTF8 on (see 'chooselocale' script).

However, if the PC has less than approx. 100MB RAM (after taking out shared video) then the default reverts to non-UTF8.

So, that is my workaround. Non-UTF8 is noticeably faster on ancient PCs anyway. But, you can still turn on UTF8 by the menu "Desktop -> Chooselocale country localisation", and if by that time you have a swap file or partition loaded then 'localedef' will not hang (I think).

The files that I have modified in Woof are /etc/profile and /usr/sbin/chooselocale

Note, there has also been discussion of the naming, 'en_US.utf8' versus 'en_US.UTF-8'. I am not really sure of the repercussion of changing this and want to postpone further consideration until after Wary 5.0-final is released.


Posted on 20 Nov 2010, 16:34


Comments:

Posted on 21 Nov 2010, 19:09 by Terryphi
UTF8 Breaks UK date format
UTF8 breaks the UK date format for me in some Wine programs. I will be sticking with en_GB.