screen-users
[Top][All Lists]
Advanced

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

Re: Hardstatus and UTF-8 NFD


From: Xavier Guérin
Subject: Re: Hardstatus and UTF-8 NFD
Date: Thu, 18 Feb 2010 18:00:46 +0100

Here are two screenshots:

1 - Normalized UTF-8, screen version 4.0.3 on SL (10.6.2) using macports (good_behaviour) :


1 - Normalized UTF-8, screen version 4.1.0 on SL (10.6.2) using the git repo (bad_behaviour) :


The situation is as follows: my ZSH's chpwd updates the current window title with the current PWD. The issue is that apple uses UTF-8 norm D to store its file names (Normalized Form Decombined, NFD). The solution I found with screen 4.0.3 was to renormalize PWD into a combined form.

What exactly happens with 4.1.0 is as follows: as soon as I change PWD to a directory which name contains and UTF-8 character (normalized), the hardstatus disappears, screen resets the buffer,  and some '\n' are printed out. From this moment, screen keeps behaving weirdly until I change PWD.

Hope this is clearer :)
Xavier


Le 18 févr. 2010 à 17:49, Sadrul Habib Chowdhury a écrit :

* Xavier Guérin had this to say on [18 Feb 2010, 17:18:09 +0100]:
Thank you for your answer. I gave a shot to the latest git version, and I'm sorry to say that it is actually worse.

With my current version, the characters present after the decomposed UTF8 characters are simply not displayed.
With the git version, it seems that the hardstatus actually crashes when given a NFD sequence.

The solution I found is to normalize a given UTF8 into a NFS compatible sequence. Here is a small python script that does the job:

#!/usr/bin/env python

import sys
import unicodedata

if len(sys.argv) == 2:
 name = unicodedata.normalize('NFC', unicode(sys.argv[1], 'utf-8')).encode('utf-8')  print name

Maybe this can be of some help for you guys.

This is indeed useful. Thanks.

If you could get a backtrace from the crash with NFD, that'd be pretty
useful too. If we can't display it correctly, at least we mustn't crash!

Cheers,
Sadrul

Xavier


Le 18 févr. 2010 à 16:50, Sadrul Habib Chowdhury a écrit :

* Xavier Guérin had this to say on [16 Feb 2010, 10:20:48 +0100]:
Hi list,

I'm using GNU screen on OSX and I use the hardstatus to display PWD. As a french speaker, I happen to have files containing accented characters, which name happens to be encoded using UTF-8 NFD (decomposed form).

As a result, PWD is not correctly displayed on my hardstatus. Do you know if this is an expected behavior, and if there is any circumvention to my issue ?

Displaying utf-8 characters in the hardstatus in utf-8 locale was
problematic. There is a 'fix' for it in the current git version at
https://savannah.gnu.org/git/?group=screen

Cheers,
Sadrul


-----
Xavier Guérin - Doctoral student
TIMA Laboratory, SLS Group
46, av. Félix Viallet, 38000 GRENOBLE, FR
Mail : address@hidden
Phone : +33(0)4 76 57 47 59
Ad Astra Per Aspera
Triste e' quel discepolo che non avanza il suo maestro




-----
Xavier Guérin - Doctoral student
TIMA Laboratory, SLS Group
46, av. Félix Viallet, 38000 GRENOBLE, FR
Phone : +33(0)4 76 57 47 59
Ad Astra Per Aspera
Triste e' quel discepolo che non avanza il suo maestro

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]