View Issue Details

IDProjectCategoryView StatusLast Update
312RackTablesdefaultpublic2010-07-07 13:15
Reporteruser120Assigned Toinfrastation  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Product Version0.17.8 
Target Version0.17.10Fixed in Version0.17.10 
Summary312: Mixed charsets causing problems
DescriptionOn a server configured with iso-8859-1 encoding, entering data with non-latin characters will cause strings to be truncated. Displaying of such data will also be broken.

By explicitly setting the

header("Content-Type: text/html;charset=UTF-8");

in the php-code the problems will be solved.
TagsNo tags attached.

Activities

2010-02-18 14:40

 

utf8.patch (606 bytes)   
diff -cB racktables_0_17_8/inc/config.php racktables_0_17_8_modified/inc/config.php
*** racktables_0_17_8/inc/config.php	2010-02-18 14:57:53.000000000 +0100
--- racktables_0_17_8_modified/inc/config.php	2010-02-18 15:00:39.126950029 +0100
***************
*** 9,14 ****
--- 9,16 ----
   *
   */
  
+ // Make sure that the pages are served with UT8 charset
+ header("Content-Type: text/html;charset=UTF-8");
  
  // Current code version is subject to change with each new release.
  define ('CODE_VERSION', '0.17.8');
Common subdirectories: racktables_0_17_8/inc/.svn and racktables_0_17_8_modified/inc/.svn
utf8.patch (606 bytes)   
infrastation

infrastation

2010-03-05 20:32

administrator   ~0000014

I will take care of this.
infrastation

infrastation

2010-03-06 18:18

administrator   ~0000021

For a better understanding, could you explain, what the server is and how it is configured?

user120

2010-03-11 08:02

  ~0000022

The server was an Apache Webserver configured with

AddDefaultCharset ISO-8859-1

and i wasn't able to change this to

AddDefaultCharset UTF-8

which would have solved the problem I ran into.

Since the database connection in the application is set up with utf8-encoding there were problems when a user tried to save strings containing characters like æ,ø and å (norwegian characters). The strings were truncated right before the norwegian letters. I guess the same will happen with letters which are not in the english alphabet.

When adding the single line of code shown in the patch-file the problem was solved.

You could of course say that this is not an error since the server initially was wrong configured, but I think this fix will make the application less error prone.
infrastation

infrastation

2010-03-11 10:17

administrator   ~0000023

Apache documentation explains, that content-type charset provided by HTTP header should have more weight, than the one available in HTML META attribute, so I agree to move charset spec to header() call in later versions of RackTables.

But could you independently try two settings below and tell, if any of these change things to better?

AddDefaultCharset utf-8
AddDefaultCharset Off

Thank you.
infrastation

infrastation

2010-03-13 11:50

administrator   ~0000024

The next version will include the fix. Anyway, it would be interesting to know, if AddDefaultCharset workaround worked for you. Thank you for reporting this.

user120

2010-03-26 13:27

  ~0000039

The only setting that worked well was

AddDefaultCharset utf-8

Both "off" and "ISO-8859-1" caused problems.
infrastation

infrastation

2010-03-28 22:25

administrator   ~0000040

Thank you for testing!

Issue History

Date Modified Username Field Change
2010-02-18 14:40 user120 New Issue
2010-02-18 14:40 user120 File Added: utf8.patch
2010-03-05 20:31 infrastation Status new => assigned
2010-03-05 20:31 infrastation Assigned To => infrastation
2010-03-05 20:32 infrastation Note Added: 0000014
2010-03-06 18:18 infrastation Note Added: 0000021
2010-03-06 18:18 infrastation Status assigned => feedback
2010-03-11 08:02 user120 Note Added: 0000022
2010-03-11 10:17 infrastation Note Added: 0000023
2010-03-11 22:52 infrastation Status feedback => assigned
2010-03-13 11:50 infrastation Note Added: 0000024
2010-03-13 11:50 infrastation Status assigned => resolved
2010-03-13 11:50 infrastation Fixed in Version => 0.17.10
2010-03-13 11:50 infrastation Resolution open => fixed
2010-03-23 14:24 infrastation Status resolved => closed
2010-03-26 13:27 user120 Note Added: 0000039
2010-03-26 13:27 user120 Status closed => feedback
2010-03-26 13:27 user120 Resolution fixed => reopened
2010-03-28 22:25 infrastation Note Added: 0000040
2010-03-28 22:25 infrastation Status feedback => closed
2010-03-28 22:25 infrastation Resolution reopened => fixed
2010-04-02 10:35 infrastation Target Version => 0.17.10
2010-07-07 13:15 infrastation Category Interface => Database - core