Bug#961641: Icewm needs too the X11 en_US locales, removed by localepurge v. 0.7.3.9

2020-06-01 Thread Michel Casabona

Le 01/06/2020 à 20:51, Miguel Figueiredo a écrit :

I suspect /usr/share/X11/locale/C was missing and not related with 
en_US, which is not needed - see screenshot from the locales directory 
on a new installation with only Portuguese files.


Let me know if /usr/share/X11/locale/C is present.



Hello,

Thanks for your testing and response.

To answer your question, yes the "C" directory is present

  $ ls /usr/share/X11/locale/C/
  Compose  XI18N_OBJS  XLC_LOCALE

I believe the problem is with how X11 supports UTF-8.

Running dmenu through strace with LANG set to fr_FR.UTF-8 shows that it 
tries to use en_US.UTF-8 and fails


  openat(AT_FDCWD, "/usr/share/X11/locale/locale.dir", O_RDONLY) = 3
  access("/usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE", R_OK) = -1 
ENOENT (Aucun fichier ou dossier de ce type)


The file /usr/share/X11/locale/locale.dir points the locale name at the 
locale database file name

In this file a comment states that the support is incomplete

  # Note: The UTF-8 locales don't work correctly yet. Work in progress.

Luckily Portuguese is correctly supported which explain why your test worked

  $ grep pt_PT.UTF-8 /usr/share/X11/locale/locale.dir
  pt_PT.UTF-8/XLC_LOCALEpt_PT.UTF-8
  pt_PT.UTF-8/XLC_LOCALE:   pt_PT.UTF-8

Indeed the locale database exists in libx11-data

  $ dpkg-deb -c libx11-data_2%3a1.6.9-2_all.deb |grep pt_PT
  drwxr-xr-x root/root 0 2020-02-26 17:40 
./usr/share/X11/locale/pt_PT.UTF-8/
  -rw-r--r-- root/root   237 2020-02-26 17:40 
./usr/share/X11/locale/pt_PT.UTF-8/Compose
  -rw-r--r-- root/root   345 2020-02-26 17:40 
./usr/share/X11/locale/pt_PT.UTF-8/XI18N_OBJS
  -rw-r--r-- root/root  2064 2020-02-26 17:40 
./usr/share/X11/locale/pt_PT.UTF-8/XLC_LOCALE


OTOH fr_FR.UTF-8 has no database and points at the US locale

  $ grep fr_FR.UTF-8 /usr/share/X11/locale/locale.dir
  en_US.UTF-8/XLC_LOCALEfr_FR.UTF-8
  en_US.UTF-8/XLC_LOCALE:   fr_FR.UTF-8

  $ dpkg-deb -c libx11-data_2%3a1.6.9-2_all.deb |grep fr_FR.UTF-8

Same for Basque eu_ES.UTF-8 as reported by Martintxo

  $ grep eu_ES.UTF-8  /usr/share/X11/locale/locale.dir
  en_US.UTF-8/XLC_LOCALEeu_ES.UTF-8
  en_US.UTF-8/XLC_LOCALE:   eu_ES.UTF-8
  $ dpkg-deb -c libx11-data_2%3a1.6.9-2_all.deb |grep eu_ES.UTF-8

Test of dmenu (LANG=fr_FR.UTF-8) with and w/o en_US.UTF-8 locale directory

  $ echo $LANG
  fr_FR.UTF-8
  $ echo -e 'One\nTwo\nThree' |  dmenu
  Two
  $ sudo mv /usr/share/X11/locale/en_US.UTF-8 
/usr/share/X11/locale/en_US.UTF-8.bkup

  $ echo -e 'One\nTwo\nThree' |  dmenu
  warning: no locale support
  warning: no locale modifiers support
  Erreur de segmentation

So it seems that en_US.UTF-8 should be treated as "C" by localepurge wrt 
UTF-8 to be safe


Thanks!



Bug#961641: Icewm needs too the X11 en_US locales, removed by localepurge v. 0.7.3.9

2020-06-01 Thread Eduard Bloch
Hallo,
* Martintxo [Sun, May 31 2020, 06:00:56PM]:

> For you to know, my locale set in /etc/default/locale is:
>  LANG=eu_ES.UTF-8
>
> So, yes, localepurge need to keep en_US.UTF-8 in /usr/share/X11/locale/.

As of now, I have no motivation in "fixing" it. Purging en_US* locales
is just a bad idea. This should be prevented by localepurge by adding
big warning signs.

Also pulling in libxft2 maintainers. I have no idea how to solve it,
since icewm uses regular libxft2 methods to calculate string lengths and
render the strings. Also, icewm does not set the en_US.UTF8 locale
anywhere. If the presence of those locale files somehow works around
your problems, then it would mean that some library code (probably in
libxft2) uses that fallback to do some magic. I'd expect this magic to
be documented properly then.

Best regards,
Eduard.

--
 *lesen*
 CrashOverride: lies mal "man undocumented", da sind einige gute
Tips drin



Bug#961641: Icewm needs too the X11 en_US locales, removed by localepurge v. 0.7.3.9

2020-05-31 Thread Martintxo
Hello

(Puting icewm maintainer in CC for he to know...)

I was searching how to solve a recent bug "in icewm", and now, thanks to
this bug report, I find it.

The bug sintoms are that the window titles (in firefox for example) with some
locale especial character, like accent marks and so, get truncated at this
special character point. And in the Icewm About window, the CodeSet field
changes from UTF-8 (in my case) to ANSI_X3.4-1968...

The problem was, too, that localepurge 0.7.3.9 had delete the files in
/usr/share/X11/locale/en_US.UTF-8.

Apliying the sugested workaround in this bugreport by Michel Casabona (many
thanks!!) solved the problem:
 - sudo dpkg-reconfigure localepurge, and select to NO purge en_US.UTF-8
 - sudo apt install --reinstall libx11-data
 - logout and login to Icewm. Solved!!

For you to know, my locale set in /etc/default/locale is: 
 LANG=eu_ES.UTF-8

So, yes, localepurge need to keep en_US.UTF-8 in /usr/share/X11/locale/.

Greetings. Martintxo.


Sustrai Erakuntza: respuesta jurídico-técnica a proyectos insostenibles.
  proiektu jasangaitzei erantzun juridiko-teknikoa.
  https://www.fundacionsustrai.org
  https://www.sustraierakuntza.org