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: Sadrul Habib Chowdhury
Subject: Re: Hardstatus and UTF-8 NFD
Date: Thu, 18 Feb 2010 11:49:29 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

* 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
> 






reply via email to

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