Red Hat Bugzilla – Bug 62382
International characters trunc Full Name field
Last modified: 2008-05-01 11:38:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020314
Description of problem:
If a non-ASCII character appears in the "Full Name" field of an user, it
prenvents that any character to its right (including itself)
appears in the field.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. At installation time add an user with non-ASCII character in its full name.
In my case the user full name is "Josi Romildo Malaquias".
2. After installation (and upgrade with up2date), run redhat-config-users. I
have done that as root.
3. Read the field "Full Name" for the refered user: it is incomplete and in my
case it is just "Jos"
4. Modify the field to "AAA", for instance.
Actual Results: The full user name is incomplete: stops at the first non-ASCII
character: "Jos". After editing the field, saving and quiting the program, the
characters including and following the first non-ASCII character appears after
the new full name, as can be seen by looking at the /etc/passwd file.
Expected Results: The full user name in the field should be the seen. After
modifying the field, the new value should not come with trailing characters in
Hmmm...I don't see any non-ASCII chars in "Josi Romildo Malaquias", or perhaps
Mozilla isn't displaying them correctly. What chars are supposed to be non-ASCII?
Maybe Mozilla did not sent it correctly when entered the bug. The non-ASCII
character I am referring to is the fourth character of my full name. It is the
vogal e with an acute accent: i (and Mozilla turned it into an i I do not know
why). redhat-config-users just shows me the first 3 letters of my full name.
Ok, thanks. Now I have a better idea of how to reproduce it.
Ok, I can reproduce the problem, but I'm not sure if I can do much about it.
The problem is that anaconda is in GTK1.2, so it doesn't know anything about
UTF-8 encoding, so it just writes the string to /etc/passwd just the way you
typed it in.
However, redhat-config-users is now ported to GTK2, which expects UTF-8
encoding. When it sees input that isn't UTF-8 encoded, it doesn't know what to
do so it throws away the character that it doesn't understand and the rest of
the string goes with it.
I will look into this some more, but I'm afraid to make changes that might break
other languages (like cyrillic based langs).
Ok, I think I've found a reasonable fix for this problem. When I read in the
user's full name, I convert it to unicode so that gtk2 can understand it. Then,
when I write the name out, I convert it from unicode back into iso-8859-1.
This should fix the problem. Please test redhat-config-users-1.0-10.noarch.rpm
when it appears in Rawhide and make sure that this works for you. If it doesn't
fix the problem, please reopen this bug report.