View Issue Details

IDProjectCategoryView StatusLast Update
0007400mantisbtlocalizationpublic2009-06-23 15:26
Reportervelizar Assigned Tosiebrand  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.5 
Target Version1.2.0rc1Fixed in Version1.2.0rc1 
Summary0007400: [all lang] When using UTF8 for encoding all reports some fields' contents are incorrectly truncated.
Description

I configured mantis installation to use utf8 encoding, as a result summary field is truncated to at most 64 chars, while the input text control allows 128 chars. Also after the string is truncated (during report submission) when the
report is viewed as a last char in the summary is contained a strange character (not always).

Same problem is valid for the news headline field, and probably all other fields which are configured as varchar(x).

Steps To Reproduce

change encoding in english strings file to utf8
enter 128 cyrillic (or anything other than standard ASCII) chars in summary field.
view the report.

Additional Information

My solution to this problem has two steps:

  1. increase summary's size in sql table to 255.
  2. change input's limitation from 128 to 127 (this is due to the fact that 2 * 128 = 256 which is larger than 255 and will result in a strange character being placed as last in the resulting symmary instead of the entered charater by the user).
TagsNo tags attached.

Relationships

related to 0004084 closedsiebrand [all lang] Use UTF-8 codepage 
child of 0010303 closedjreese Create and use string_api wrappers for multibyte string functions 

Activities

velizar

velizar

2006-08-30 06:14

reporter   ~0013343

Another simple solution to this problem is to just change all fields with varchar type to 'text' type, thus eliminating the need to change input control's max length parameter. But this solution probably has a problem with the fact that DB size will probably be increased (I'm not sure about this).

ryandesign

ryandesign

2006-09-12 06:57

reporter   ~0013365

Does the data end up incorrectly truncated (in the middle of a character) in the database or only when it's then displayed on screen?

siebrand

siebrand

2008-09-10 17:12

developer   ~0019361

Mantis now uses UTF-8. Can you please report if this issue is still current using Mantis 1.2.0a2 or later?

siebrand

siebrand

2009-03-28 19:48

developer   ~0021258

Set to confirmed on git trunk. I fixed a case for too long filter names in git trunk.

siebrand

siebrand

2009-03-30 18:37

developer   ~0021303

Last edited: 2009-03-30 18:37

I have been going over the data model to find out which instances need to be fixed. Here my report:

  • mantis_project_table.name (128): has maxlength="128" on manage_proj_create_page.php, but no protection in code
  • mantis_tag_table.name (100): has maxlength="100", but no protection in code

(check incomplete)

siebrand

siebrand

2009-04-27 16:54

developer   ~0021705

Planned 1.2.x

jreese

jreese

2009-06-16 17:09

reporter   ~0022178

Reminder sent to: siebrand

Is this issue fixed now with 0010303 taken care of?

siebrand

siebrand

2009-06-16 17:15

developer   ~0022179

Let's consider it fixed until proven otherwise.