Bug 385872

Summary: Can't enter umlaut characters in yast2 ncurses input fields
Product: [openSUSE] openSUSE 11.0 Reporter: Forgotten User QtBI7gWTIh <forgotten_QtBI7gWTIh>
Component: YaST2Assignee: Stefan Hundhammer <shundhammer>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: gs, jsuchome, mvidner
Version: Beta 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Beta-NTS Services Priority: 500
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: all of YaST2 Log
The last logs from YaST2-Ldap-client
The Language File

Description Forgotten User QtBI7gWTIh 2008-05-02 06:17:28 UTC
When i create a ldap server and like to add a user, in the Firstname Button it is not possible to add a name like "Günther" the extended Char is not accepted?

The Lastname Field is not tested.
Comment 1 Jiří Suchomel 2008-05-02 06:31:03 UTC
Hm, I am able to enter "Günther" as First name.

What is the real result? Does YaST complain somehow with an error message?

Are you able to use such characters for fullname of local (not LDAP) user?

Could you test also with the Last name?
Comment 2 Forgotten User QtBI7gWTIh 2008-05-02 08:02:03 UTC
Question Why ?? ;).

There are no error messages, only the "char" (üöä..) are not accepted.

now i start the Test computer again, now it is possible to enter extended Chars by creating a new user? 

but I can't find and change the first user, I created with YaST2 in the Ldap mask?

But it is possible for this user to make a autologin ?

the ldap Tree is now

dc=xxxxx,dc=xxxxx
   ou=ldapconfig
   uid=gjn    // (the fist user I created after install [1000]) ??
   ou=Mailserver
   ou=group
   ou=people
      uid=office // (this is the new (second) user I created [1001)
   ou=DNS

By the user office the extended Chars are accepted in Firstname / Lastname

I must fist copy the YaST2 log to attached this
Comment 3 Jiří Suchomel 2008-05-02 08:11:28 UTC
(In reply to comment #2 from Günther J. Niederwimmer)

> There are no error messages, only the "char" (üöä..) are not accepted.

Strange, but this works for me.
Is your keyboard configured correctly?
 
> now i start the Test computer again, now it is possible to enter extended
> Chars
> by creating a new user? 

So, the problem is not reproducible?

> but I can't find and change the first user, I created with YaST2 in the Ldap
> mask?

Sorry, I do not understand.

> But it is possible for this user to make a autologin ?

Autologin is not related to this problem.
Comment 4 Forgotten User QtBI7gWTIh 2008-05-02 08:19:19 UTC
Created attachment 211900 [details]
all of YaST2 Log

My YaST2 Logs from the Install and config
Comment 5 Forgotten User QtBI7gWTIh 2008-05-02 08:37:42 UTC
Yes, the keyboard are german (DE)

Yes, in the moment it is not reproducible :(, but I start a new fresh / clean install this weekend ;)

When I start the YaST2 User Agent the first user I created with YaST2 (gjn) is not shown (?) in any Filter from YaST2 User agent.

The new (second) user "office" is shown in the Ldap Filter ?

but the user "gjn" is in the Ldap Database (on a wrong place?). 

Comment 6 Jiří Suchomel 2008-05-02 08:56:21 UTC
(In reply to comment #5 from Günther J. Niederwimmer)
> Yes, the keyboard are german (DE)
> 
> Yes, in the moment it is not reproducible :(, but I start a new fresh / clean
> install this weekend ;)

Yes, please, test with beta2.

> When I start the YaST2 User Agent the first user I created with YaST2 (gjn) is
> not shown (?) in any Filter from YaST2 User agent.
> 
> The new (second) user "office" is shown in the Ldap Filter ?
> 
> but the user "gjn" is in the Ldap Database (on a wrong place?). 

Looks like you've first created LDAP user gjn, than created LDAP user and group objects ("Create Default Configuration Objects" in LDAP client configuration), and than added new user office. Now, YaST looks for users in the location specified by the new created LDAP configuration, e.i. under ou=people. That's why you don't see user 'gjn' there and that's why new user 'office' was created thare. This is IMHO correct behavior.

Comment 7 Forgotten User QtBI7gWTIh 2008-05-02 09:51:57 UTC
In my remember, I have created the ldap Database with YaST2-Ldap-Server then configured the Ldap-Clien (all without TTL/SSL, I have no CA in this Moment) with YaST2-Ldap-client and then add the User with YaST2-User-Agent. 

All with the ncurses Version.

I make also a seperate ("Create Default Conf-- Objects")

OK, now I test / delete the Ldap Database and create a new one, after this I start YaST2-Client-config and add the User again.  
 
Comment 8 Forgotten User QtBI7gWTIh 2008-05-02 09:56:11 UTC
It is not possible to create the default user Config ("Create Default Configuration Objects" in LDAP client configuration) again, in the new created ldap Database ?

YaST2 2 Log ?

Noe I delete / clean the Yast-Client.conf ind /etc/sysconfig and Check it again. 
Comment 9 Forgotten User QtBI7gWTIh 2008-05-02 09:57:33 UTC
Created attachment 211927 [details]
The last logs from YaST2-Ldap-client
Comment 10 Jiří Suchomel 2008-05-02 10:29:41 UTC
How did you deleted the old database - manually? The new one, you've created with ldap-server has the same base DN?
Comment 11 Forgotten User QtBI7gWTIh 2008-05-02 10:50:20 UTC
OK my mistake ;), I found it out also :).


OK, I have created the new ldap Database with ldad-server, the next I configure the ldap-client and create the "Create Default Configuration Objects" then I change ldap-server / client to use TTL/SSL all now OK.

The next, I will create a ldap User, I have AGAIN the Problem with extra Char ?

Only a "pip" is hear by (üöä, but my Name "Günther" is not accepted
Comment 12 Forgotten User QtBI7gWTIh 2008-05-02 11:00:48 UTC
Now I found out, after start the X-system and login as "gjn" in the Graphic YaST2-User Agent, I can change my Name from Guenther To "Günther", it is a ncurses Problem from the YaST2 Module YaST2-User.
Comment 13 Jiří Suchomel 2008-05-02 11:25:49 UTC
YaST Users module doesn't have any restriction in Qt version different to ncurses one. Are you able to use your umlaut-characters in another YaST modules (and also in yast2 users, but at different places), using ncurses frontend?
Comment 14 Forgotten User QtBI7gWTIh 2008-05-02 12:38:41 UTC
OK, what I found. I mean, I can't on all ncurses YaSt2 module insert a extra Char ? I tested it, in search in software install ?

I found no other possible Place (?) :(.
Comment 15 Jiří Suchomel 2008-05-02 12:42:28 UTC
UI issue?
Comment 16 Stefan Hundhammer 2008-05-05 10:57:47 UTC
What widget is affected?
Does it also happen with any of the UI examples?
If it is a TextEntry / InputField or a ComboBox, do you have the ValidChars property set?
Comment 17 Jiří Suchomel 2008-05-05 11:06:36 UTC
In reply to comment #16 from Stefan Hundhammer)
> What widget is affected?

`InputField (`id(`givenname), ...) from yast2-users

> Does it also happen with any of the UI examples?

I don't know, I cannot reproduce the issue.

> If it is a TextEntry / InputField or a ComboBox, do you have the ValidChars
> property set?

There's no  ValidChars property set for this widget.

Comment 18 Stefan Hundhammer 2008-05-05 11:19:18 UTC
From macro_inst_initial.ycp from the y2logs tarball from comment #4:

    {
        //
        // Source: /mounts/mp_0001/usr/share/YaST2/clients/inst_user_first.ycp( UserInput () ):584
        // 2008-04-30 10:14:35

        UI::ChangeWidget( `id (`cn),	`Value,	"Günther J. Niederwimmer" );	// YInputField "Vollständiger Name des Benutzers"
        UI::ChangeWidget( `id (`username),	`Value,	"gjn" );	// YInputField "Benutzername"
        UI::ChangeWidget( `id (`root_pw),	`Value,	false );	// YCheckBox "Benutze das Passwort für den Systemadministrator"
        UI::ChangeWidget( `id (`root_mail),	`Value,	true );	// YCheckBox "Systemmail empfangen"
        UI::ChangeWidget( `id (`autologin),	`Value,	true );	// YCheckBox "Automatisches einloggen"

        // UI::MakeScreenShot( "/tmp/yast2-0080" );
        UI::FakeUserInput( `change );

        return;
    }


So the name with the umlaut character was accepted properly.
Günther, what did you see on the screen? 
Was there "Günther" or something like "G|nther"?

In the latter case, this might be a display problem or a bad locale setup in the inst-sys.
Comment 19 Jiří Suchomel 2008-05-05 11:24:30 UTC
Stefan, the problem wasn't observed during installation (at least not during 1st stage): it is not possible to create LDAP user at that time.
Comment 20 Stefan Hundhammer 2008-05-05 11:26:59 UTC
I just re-checked with Beta1:

I can enter "Günther" allright as the user's first name during installation, but the umlaut character is omitted in the user name. This is intentional AFAICS; user names with non-ASCII characters might result in all kinds of problems.

I can't test that with LDAP authentication, though; I don't have a testing LDAP server I could use. But I don't see how that should be different from the UI point of view.


If there is any problem, I don't see it.
Comment 21 Stefan Hundhammer 2008-05-05 11:31:32 UTC
Günther, what exactly was the scenario where it didn't work as expected?
How did you start it?
Is the problem any different if started from a shell (rather than from the YaST2 control center)?
Is it different from using a Linux console (tty1..tty6) and xterm / konsole?
How was your locale set up? (Output of "locale")
Does it work with locale "de_DE.UTF-8"? 
Any difference to "de_AT.UTF-8" (which I assume you are using)?
Comment 22 Jiří Suchomel 2008-05-05 11:38:05 UTC
(In reply to comment #20 from Stefan Hundhammer)

> I can enter "Günther" allright as the user's first name during installation,
> but the umlaut character is omitted in the user name. This is intentional
> AFAICS; user names with non-ASCII characters might result in all kinds of
> problems.

Yes.
 
> I can't test that with LDAP authentication, though; I don't have a testing LDAP
> server I could use. But I don't see how that should be different from the UI
> point of view.

So do I.
Comment 23 Forgotten User QtBI7gWTIh 2008-05-05 15:18:27 UTC
OK I start this morning a new installation with Beta 2

In the graphic Installation I can write "Günther" NO ldap installed

#18

but I found in the yast-user agent (ncurses) "G?nther J. Ni...."

#21

LANG=POSIX
LC_CTYPE=de_DE.UTF8
LC_NUMERIC="POSIX"
.....
...
...
..
.         ="POSIX"
LC_ALL=

a old Question ;)

why is LC_CTYPE not changed to de_AT.UF8 when I say country is AUSTRIA ? ;)

It is also not only the ldap User screnn it also in the normal User screen ?

I can't create a new User withe a Umlaut again. 
 
Comment 24 Jiří Suchomel 2008-05-06 09:23:52 UTC
(In reply to comment #23 from Günther J. Niederwimmer)

> #21
> 
> LANG=POSIX
> LC_CTYPE=de_DE.UTF8
> LC_NUMERIC="POSIX"
> .....
> ...
> ...
> ..
> .         ="POSIX"
> LC_ALL=

Strange, how did you came to the POSIX values...

> a old Question ;)
> 
> why is LC_CTYPE not changed to de_AT.UF8 when I say country is AUSTRIA ? ;)

Because you are not setting country but the timezone. If you want to set de_AT, open YaST Langauge, go to "Details" and select "de_AT" in Detailed Locale Setting. After that, what does your 'locale' command say? And what is in /etc/sysconfig/language?
 

Comment 25 Forgotten User QtBI7gWTIh 2008-05-06 12:00:26 UTC
mea culpa ;)
the origin locale ..

LANG=POSIX
LC_CTYPE=de_DE.UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=


I know the way to change the Language ;)
Comment 26 Jiří Suchomel 2008-05-06 12:05:09 UTC
Please, set your language with yast2 language and show the locale output after it. Also, attach /etc/sysconfig/language.
Comment 27 Forgotten User QtBI7gWTIh 2008-05-06 12:35:02 UTC
OK, I chang the language with YaST2

locale ..

LANG=POSIX
LC_CTYPE=de_AT.UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

the /etc/sysconfig/language is attached
Comment 28 Forgotten User QtBI7gWTIh 2008-05-06 12:36:47 UTC
Created attachment 212673 [details]
The Language File
Comment 29 Jiří Suchomel 2008-05-06 13:24:05 UTC
OK, than again: are you able to enter "Günther" on text console? Not in xterm, but on the console where you get by pressing Ctrl+Alt+F2.
Comment 30 Jiří Suchomel 2008-05-06 13:29:06 UTC
Attach also 
/etc/sysconfig/keyboard
/etc/sysconfig/console
Comment 31 Forgotten User QtBI7gWTIh 2008-05-06 13:50:36 UTC
OK ;),

On console 1-6 no Problem with Umlaut (Günther).

Only in YaSt ncurses no extended Chars ?

Comment 32 Jiří Suchomel 2008-05-06 13:56:39 UTC
Stefan, again this looks like a UI bug.
Comment 33 Stefan Hundhammer 2008-05-06 14:59:26 UTC
With LANG=POSIX I also can't enter non-ASCII characters. That is to be expected; there is no defined encoding conversion in the POSIX locale. It's 7 bit ASCII.

With LANG=POSIX and LC_CTYPE=de_AT.utf8 (your setup from comment #27), I can enter umlaut characters allright. I checked with the KDE4 konsole, with xterm, and on the Linux console (tty2).

I checked with LC_CTYPE=de_AT.utf8 and with LC_CTYPE=de_AT.UTF-8 . It works fine in all cases.

So what _is_ the problem?
Comment 34 Forgotten User QtBI7gWTIh 2008-05-06 15:12:12 UTC
The Problem is YaST2 NCURSES in YaST2 I can't enter umlaut
Comment 35 Forgotten User QtBI7gWTIh 2008-05-06 16:09:39 UTC
Stefan,
all you tested is OK, also on my site with "umlaut", but in the ncurses Version of YaST2 I can't configure a User with umlaut or insert on any place a umlaut ?  
Comment 36 Gabriele Mohr 2008-05-07 11:32:04 UTC
I think the problem is that LANG is set to POSIX. When starting the ncurses UI 
nl_langinfo( CODESET ) is called to get the character encoding used. The y2log file shows that for LANG=POSIX the encoding is set to ANSI_X3.4-1968:
YNCursesUI.cc(YNCursesUI):75 setenv LC_CTYPE: C encoding: ANSI_X3.4-1968
NCstring.cc(setTerminalEncoding):325 Terminal encoding SET to: ANSI_X3.4-1968
YApplication.cc(setLanguage):160 Setting language to POSIX.UTF-8.ANSI_X3.4-1968

The question is: why is LANG set to POSIX?
I have tested the installation workflow and the installed system (xterm, konsole) with ncurses UI - no problems to enter 'umlauts'. LANG, as well as all other locale settings, are always set to <language>.UTF-8.
When exactly do the problems with 'umlauts' start? Changing the language with yast language module sets all locale settings to UTF-8. How do you set up your locale settings? 
Comment 37 Jiří Suchomel 2008-05-07 11:37:38 UTC
For root, it is the default behavior that everything except LC_CTYPE is set to POSIX. But it works: at least on my 10.3, root can enter such characters in ncurses mode.

Check yours root's config.
Comment 38 Stefan Hundhammer 2008-05-07 12:02:00 UTC
(In reply to comment #34 from Günther J. Niederwimmer)
> The Problem is YaST2 NCURSES in YaST2 I can't enter umlaut

Yes, sure, that's what I was testing all the time in all the different scenarios described above. It works fine for me.

Comment 39 Gabriele Mohr 2008-05-07 12:41:49 UTC
(In reply to comment #37 from Jiri Suchomel)
> For root, it is the default behavior that everything except LC_CTYPE is set to
> POSIX. But it works: at least on my 10.3, root can enter such characters in
> ncurses mode.
> 
Yes, you are right, I didn't notice this. 
But during installation all locale settings are set to UTF-8 and if I login as root in an xterm the locale settings remain the same as set for the user.
I have also tested with 10.3 and have checked the logfile. The encoding is set correctly here to UTF-8 although LANG is set to POSIX.
I assume that the reason for not working ncurses in 11.0 is that the encoding is not set corretcly for ncurses in case that LANG is set to POSIX (y2log:
NCursesUI.cc(YNCursesUI):75 setenv LC_CTYPE: C encoding: ANSI_X3.4-1968).




 
 

Comment 40 Gabriele Mohr 2008-05-07 13:07:45 UTC
Stefan and me have just tested again. If ncurses yast is started with command line 'yast users' it works fine on console with only LC_CTYPE set to <language>.UTF-8
(correct encoding in logfile).
If the user module is started from the ncurses control center it doesn't work (encoding set to ANSI_X3.4-1968).

Comment 41 Stefan Hundhammer 2008-05-08 10:34:12 UTC
To clarify this:

The problem occurs when starting the YaST2 users module in ncurses from the YaST2 ncurses (YCP-based) control center.

It does not happen when starting "yast users" from the command line.


So the problem is very likely in WFM::CallModule() or WFM::CallFuntion(), whichever one is used from the YCP control centers: The locale environment is somehow changed when the module is started.

Martin, any clue?
Comment 42 Katarina Machalkova 2008-05-09 08:41:17 UTC
> So the problem is very likely in WFM::CallModule() or WFM::CallFuntion(),
> whichever one is used from the YCP control centers:

Not really, it is UI::RunInTerminal() that is used to start a new module from ncurses control center (it uses system() internally). Check menu.ycp client

I see at least one problem on YApplication/YNCursesUI side (with standard setup for root user - POSIX locale for everything except LC_CTYPE which is nl_NL.UTF-8 in my case) See:

2008-05-09 10:44:54 <1> dhcp5(17652) [ncurses] YNCursesUI.cc(YNCursesUI):75 setenv LC_CTYPE: nl_NL.UTF-8 encoding: UTF-8
2008-05-09 10:44:54 <1> dhcp5(17652) [ui] YApplication.cc(setLanguage):160 Setting language to POSIX.UTF-8

Don't know how it all happens at the end, but POSIX.UTF-8 is certainly not valid locale. You might also want to check /sbin/yast startup script, if it does not mangle locale setup in some way ...

Comment 43 Gabriele Mohr 2008-05-13 09:53:05 UTC
It seems indeed the YApplication.cc(setLanguage) call which causes the trouble.
I have checked the old (10.3) code. Here the YNCursesUI::setLanguage() call is a NOP (I think a remaining from former code and contains only debug logging ). The new code (YNCursesUI.cc, line 81) calls app()->setLanguage( language, encoding ); which doesn't set the language correctly. Not to call app()->setLanguage() solves the problem.
Comment 44 Gabriele Mohr 2008-05-14 08:39:30 UTC
The correct way to solve the problem is not to call YApplication::setLanguage() (which would overwrite the LC_CTYPE) in NCApplication::setLanguage().
The bugfix is available with yast2-ncurses-2.16.26.