View Issue Details

IDProjectCategoryView StatusLast Update
0009925mantisbtlocalizationpublic2009-06-23 15:26
Reporterarchonfx Assigned Tosiebrand  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0a2 
Fixed in Version1.2.0rc1 
Summary0009925: Export to excel encoding problem
Description

If the DB saves data in UTF8, then "exporting to excel" will output wrong encoded characters(for multi-bytes characters such as Chinese or Japanese).

I find that, this problem is caused by this function "excel_prepare_string()" in "excel_api.php:

$t_ret .= utf8_encode($t_value);

This is not correct if the DB saves data in UTF8. In such case, it should be:

$t_ret .= $t_value;

I think you should judge the DB encoding before doing the utf8_encode.

Steps To Reproduce
  1. Set DB to save data in UTF8;
  2. Report some bugs in which some fields contain multi-bytes characters such as Chinese or Japanese;
  3. View the bugs and export them into an excel file;

You can find the bug.

Additional Information

some Chinese characters for example:

????????

TagsNo tags attached.

Activities

siebrand

siebrand

2009-03-26 22:07

developer   ~0021228

Can you please provide a patch based on git master?

siebrand

siebrand

2009-03-30 19:08

developer   ~0021313

Fixed in git trunk.