Zend Framework

Non ASCII characters break the columns when input is UTF-8 encoded

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.2
  • Fix Version/s: 1.8.0
  • Component/s: Zend_Text_Table
  • Labels:
    None

Description

Non ASCII characters break the columns when input is UTF-8 encoded.

The problem is located in the Zend_Text_Table_Column class on line 229. The str_pad() function is used and it is not overloaded by mbstring extension so it fails calculating correctly the string length.

Activity

Hide
Thomas Weidner added a comment -

Iconv has to be used instead of mbstring because it's available in default php installations.
Mbstring is only allowed to be used when there is no other way.

Show
Thomas Weidner added a comment - Iconv has to be used instead of mbstring because it's available in default php installations. Mbstring is only allowed to be used when there is no other way.
Hide
Ben Scholzen added a comment -

Jean, can you please submit a test case to demonstrate, how the column breaks?

Show
Ben Scholzen added a comment - Jean, can you please submit a test case to demonstrate, how the column breaks?
Hide
Jean-Marc Fontaine added a comment -

Test case for the bug

Show
Jean-Marc Fontaine added a comment - Test case for the bug
Hide
Ben Scholzen added a comment -

Fixed in r13556 and merged into 1.7 branch with r13557

Show
Ben Scholzen added a comment - Fixed in r13556 and merged into 1.7 branch with r13557

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: