Bug 3089 - Special characters (e.g. German) in people profiles turn to "?" after saving
Special characters (e.g. German) in people profiles turn to "?" after saving
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: User Interface
2.2
PC Linux
: P1 normal
Assigned To: MJ Suhonos
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-19 06:59 PDT by Ivailo Stoyanov
Modified: 2009-02-04 11:48 PST (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Charset Patch against OCS 2_0_0-1 (21.96 KB, patch)
2007-11-14 09:27 PST, MJ Suhonos
Details | Diff
Charset Patch against OCS 2_0_0-1 (corrected Form.inc.php) (23.41 KB, patch)
2008-01-04 09:02 PST, MJ Suhonos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivailo Stoyanov 2007-10-19 06:59:55 PDT
When creating a new user and entering its name containing special characters (e.g. the German ö/ä/ü) the latter appear as question marks on http://BASEURL/index.php/testj/manager/people/all upon saving the user profile. Both pages use UTF-8 encoding (according to the browser) and the mentioned characters are entered via the German (IBM) keyboard layout in Windows.
Comment 1 Ivailo Stoyanov 2007-10-23 05:14:33 PDT
Here are some additional details concerning the bug:

 * OS is unknown -- (the shared hosting server runs linux-2.6.19.2, so 
it might be CentOS 4.x as I have seen being offered on the hosters' 
homepage)

 * PHP version is 4.4.7

'./configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' 
'--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' 
'--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' 
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' 
'--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' 
'--with-imap=/usr/local/imap-2004g' '--enable-mbstring' 
'--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' 
'--with-mhash' '--enable-magic-quotes' '--with-mysqli' 
'--with-mysql=/usr' '--with-openssl' '--enable-discard-path' 
'--with-pear' '--with-pgsql=/usr' '--enable-xslt' '--with-xslt-sablot' 
'--enable-safe-mode' '--enable-sockets' '--enable-track-vars' 
'--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' 
'--enable-versioning' '--enable-wddx' '--with-xmlrpc' '--with-zlib'

 * Apache version is 1.3.37

 * MySQL version is 4.1.22

Although UTF-8 was active all the time (in View > Character encoding menu) I have tried to force Firefox (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8) to use UTF-8 explicitly, but 
these (and also many other accented) characters simply don't get displayed correctly *after* being saved. They are displayed *before* (in the text-boxes), though.
Comment 2 MJ Suhonos 2007-11-02 23:16:19 PDT
Developed an i18n test harness for checking UTF-8 normalization on future recurrences of this issue on untested platforms.  Also added a config parameter to disable normalization entirely if the site admin wishes.

Tested consistent normalization of new code on:

PHP version 5.2.4 (Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2 PHP/5.2.4 on Darwin)
mbstring: enabled / iconv: enabled

PHP version 5.2.4 (Apache/2.2.4 (EL4) on Linux)
mbstring: enabled / iconv: enabled

PHP version 5.1.6 (Apache/2.2.3 (CentOS) on Linux)
mbstring: not available / iconv: enabled

PHP version 4.4.7 (Apache/1.3.33 (Darwin) mod_gzip/1.3.26.1a PHP/4.4.7 mod_ssl/2.8.24 OpenSSL/0.9.7l DAV/1.0.3 on Darwin)
mbstring: enabled / iconv: not available

PHP version 4.4.6 (Apache/2.0.59 (Unix) PHP/4.4.6 DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.7l on Darwin)
mbstring: enabled / iconv: not available

PHP version 4.3.9 (CLI on Darwin)
mbstring: enabled / iconv: not available

PHP version 4.3.2 (CLI on Darwin)
mbstring: enabled / iconv: enabled
Comment 3 Alec Smecher 2007-11-03 09:03:53 PDT
MJ, could you attach a patch for this so that it can be back-ported into OCS 2?
Comment 4 MJ Suhonos 2007-11-14 09:27:54 PST
Created attachment 375 [details]
Charset Patch against OCS 2_0_0-1

Provides character set normalization functionality to OCS 2.0 release.
Comment 5 MJ Suhonos 2007-11-14 09:29:58 PST
Confirmed fixed on reporter's platform.
Comment 6 MJ Suhonos 2008-01-04 09:02:01 PST
Created attachment 452 [details]
Charset Patch against OCS 2_0_0-1 (corrected Form.inc.php)

Fixed patch as per discussion at http://pkp.sfu.ca/support/forum/viewtopic.php?p=9022#p9022