Bug 104600

Summary: German umlauts broken in phpMyAdmin (utf-8 issue)
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Christian Boltz <suse-beta>
Component: NetworkAssignee: Petr Ostadal <postadal>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Beta 1   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Christian Boltz 2005-08-14 14:24:17 UTC
After updating to 10.0, the german umlauts (like ä, ö, ü, ß) are broken in 
phpMyAdmin - it seems like they are utf-8 encoded, but the pages are served as 
iso-8859-1(5). 
 
I had the same effect after changing the system-wide encoding to utf-8 using 
YaST - I even rebootet after that.
Comment 1 Dr. Werner Fink 2005-08-16 09:27:49 UTC
maybe an groff problem or wrong usage of the german umlauts
within the manual page (directly coded in iso-8859-1 instead
of using `Named Characters' like \[:a],\ [:o], \[:u], \[ss])
Comment 2 Dr. Werner Fink 2005-08-16 10:05:14 UTC
OK, no manual page. Btw: It seems to work in Japanese.
Please report _more_ details.
Comment 3 Mike Fabian 2005-08-17 20:49:35 UTC
Can you *please* describe in more detail how to reproduce the problem?

Comment 4 Christian Boltz 2005-08-17 23:18:59 UTC
Sorry, at the moment I'm out of time to investigate the problem more detailed.  
Additionally, I've booted 9.3 at the moment. However, I didn't want you to go 
begging ;-)  
  
Just some notes - perhaps they already help you.  
  
To reproduce the problem, I just have to open phpMyAdmin (language: german) in  
a browser and log in as any MySQL user. There are already some broken umlauts  
at the welcome page of phpMyAdmin.  
  
I just looked into 9.3's phpMyAdmin (which has the same problem). The welcome  
page contains  
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
but the umlauts are iso-8859-1(5)-encoded.  
  
I don't know if it's related to the problem, but I always install new SUSE  
releases as update, so there may be some not-updated config files or something  
like that. I also prefer iso-8859-15 as system-wide charset - but the problem  
also appeared when I (accidently ;-) used utf-8 shortly after installation of  
10.0 beta1.  
  
(BTW: I remove the "sample" umlauts from subject until bugzilla can correctly  
encode the subject in mails. Unencoded special chars in the mail header count  
too high in spamfilters.)  
Comment 5 Mike Fabian 2005-08-18 07:10:01 UTC
What is the output of "w3m -dump_head" on the welcome page
of phpMyAdmin on your system?
Comment 6 Mike Fabian 2005-08-18 08:49:37 UTC
Christian Boltz> (BTW: I remove the "sample" umlauts from subject
Christian Boltz> until bugzilla can correctly encode the subject in
Christian Boltz> mails. Unencoded special chars in the mail header
Christian Boltz> count too high in spamfilters.)

The bugzilla guys are working on a fix for that. See bug #78338.
Comment 7 Mike Fabian 2005-08-18 09:00:14 UTC
I asked for the output of "w3m -dump_head" because I guess it is
a configuration problem of Apache.

Comment 8 Mike Fabian 2005-08-18 09:43:20 UTC
The welcome page in German works just fine for me on SuSE Linux 10.0 Beta2.
I use UTF-8 as the system wide encoding, the page has

   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

in the source and everything looks OK.
Comment 9 Christian Boltz 2005-08-21 21:23:53 UTC
I finally had the time to investigate the problem. 
 
> What is the output of "w3m -dump_head" on the welcome  
> page of phpMyAdmin on your system? 
 
beta1@cboltz:~> w3m -dump_head  
'http://localhost/phpMyAdmin/main.php?lang=de-utf-8&server=1&collation_connection=utf8_general_ci' 
Username for phpMyAdmin auf localhost: fontlinge 
Password: 
HTTP/1.1 200 OK 
Date: Sun, 21 Aug 2005 18:52:43 GMT 
Server: Apache/2.0.54 (Linux/SUSE) 
X-Powered-By: PHP/4.4.0 
Set-Cookie: pma_lang=de-utf-8; expires=Tue, 20 Sep 2005 18:52:44 GMT; 
path=/phpMyAdmin 
Set-Cookie: pma_charset=iso-8859-1; expires=Tue, 20 Sep 2005 18:52:44 GMT; 
path=/phpMyAdmin 
X-ob_mode: 1 
Expires: Sun, 21 Aug 2005 18:52:44 GMT 
Last-Modified: Sun, 21 Aug 2005 18:52:44 GMT 
Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, 
max-age=0 
Pragma: no-cache 
Content-Encoding: gzip 
Vary: Accept-Encoding 
Connection: close 
Content-Type: text/html; charset=utf-8 
 
 
In between, I could track down the problem to config.inc.php. Here's a diff to 
the original config file: 
 
--- config.default.php  2005-03-19 22:46:25.000000000 +0100 
+++ config.inc.php      2005-08-21 21:03:56.000000000 +0200 
[authentification changes skipped] 
@@ -395,1 +395,1 @@ 
-$cfg['DefaultLang'] = 'en-iso-8859-1'; 
+$cfg['DefaultLang'] = 'german'; 
@@ -399,0 +401 @@ 
+$cfg['Lang']     = 'de-iso-8859-1'; 
 
After removing the last one ($cfg['Lang']) it works again and phpMyAdmin sends 
out utf-8 encoded umlauts which match the charset header. That fixes/works 
around the mentioned problem. 
 
Why did I say "works around"? According to the comments in config.default.php 
and libraries/select_lang.lib.php, phpMyAdmin officially supports 
de-iso-8859-1  - so it should also work without charset problems with this 
setting ;-) 
 
Sending out the umlauts in the requested encoding (iso-8859-1) works 
correctly, but the headers contain the wrong encoding (utf-8) and do not honor 
the configuration setting. This results in "broken" umlauts in the browser. 
 
Since this problem does not appear in default configuration, it's your choice 
to reduce the severity of this bug, to forward it to the phpMyAdmin developers 
or to close it completely. 
Comment 10 Petr Ostadal 2005-08-22 22:17:33 UTC
Ok I make bug entry in phpMyAdmin bugzilla
https://sourceforge.net/tracker/index.php?func=detail&aid=1266626&group_id=23067&atid=377408
Comment 11 Petr Ostadal 2005-08-23 12:56:33 UTC
Michal Čihař fixed for us ;) fix will be in
http://cvs.sourceforge.net/viewcvs.py/phpmyadmin/phpMyAdmin/libraries/database_interface.lib.php?r1=2.19&r2=2.20

Comment 12 Petr Ostadal 2005-08-23 12:57:06 UTC
fixed and submited to STABLE
Comment 13 Christian Boltz 2005-08-23 22:00:56 UTC
Wow - that was really fast! 
 
I just tested it (with 9.3's phpMyAdmin) - it works perfectly :-) 
 
Thanks! 
 
Comment 14 Vance Baarda 2005-10-17 03:31:44 UTC
(In reply to comment #6)
> Christian Boltz> (BTW: I remove the "sample" umlauts from subject
> Christian Boltz> until bugzilla can correctly encode the subject in
> Christian Boltz> mails. Unencoded special chars in the mail header
> Christian Boltz> count too high in spamfilters.)
> 
> The bugzilla guys are working on a fix for that. See bug #78338.

Actually, it's bug 78557.