[ 
https://issues.apache.org/jira/browse/ZETACOMP-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026263#comment-13026263
 ] 

[email protected] commented on ZETACOMP-15:
-------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/671/
-----------------------------------------------------------

(Updated 2011-04-28 11:47:17.655033)


Review request for zetacomponents.


Changes
-------

Fixed incorrect license header, ref ZETACOMP-80 
(https://issues.apache.org/jira/browse/ZETACOMP-80) 


Summary
-------

Used iconv/mbstring to get multibyte safe string functions.


This addresses bug ZETACOMP-15.
    https://issues.apache.org/jira/browse/ZETACOMP-15


Diffs (updated)
-----

  trunk/Template/src/functions/string_code.php 1097375 
  trunk/Template/src/functions/string_functions.php 1097375 
  trunk/Template/src/structs/lower_to_upper.php PRE-CREATION 
  trunk/Template/src/structs/upper_to_lower.php PRE-CREATION 
  trunk/Template/src/template_autoload.php 1097375 
  trunk/Template/src/unicode/generate_unicode_tables.php PRE-CREATION 
  trunk/Template/tests/regression_test.php 1097375 
  trunk/Template/tests/regression_tests/functions/correct/string_functions.in 
1097375 
  trunk/Template/tests/regression_tests/functions/correct/string_functions.out 
1097375 
  trunk/Template/tests/string_function_test.php PRE-CREATION 
  trunk/Template/tests/suite.php 1097375 

Diff: https://reviews.apache.org/r/671/diff


Testing
-------

Ran the unit test suite :

PHP 5.3.2 (cli) (built: Apr  5 2011 21:42:43) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

PHPUnit 3.5.10 by Sebastian Bergmann.

Zeta Components:                        

  Template:                             
    ezcTemplateRegressionTest:          
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
    ezcTemplateFileExceptionTest:       .....
    ezcTemplateVariableCollectionTest:  ..
    ezcTemplateValidationItemTest:      ..
    ezcTemplateOutputContextTest:       .
    ezcTemplateXhtmlContextTest:        .
    ezcTemplateCursorTest:              ........
    ezcTemplateWhitespaceRemovalTest:   .....
    ezcTemplateTextBlockElementTest:    .
    ezcTemplateOperatorTest:            ...
    ezcTemplateCodeElementsTest:        ........
    ezcTemplateSourceCodeTest:          ................
    ezcTemplateCompiledCodeTest:        .........
    ezcTemplateConfigurationTest:       ....
    ezcTemplateCacheTest:               
...........................................
    ezcTemplateCacheManagerTest:        SSSSS
    ezcTemplateTest:                    .....................
    ezcTemplateLocaleTest:              ..
    ezcStringFunctionTest:              .............

Time: 01:50, Memory: 27.75Mb

OK, but incomplete or skipped tests!
Tests: 1064, Assertions: 2081, Skipped: 5.


Thanks,

Jérôme



> Template string functions are not multibyte safe
> ------------------------------------------------
>
>                 Key: ZETACOMP-15
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-15
>             Project: Zeta Components
>          Issue Type: Improvement
>          Components: Template
>            Reporter: Andreas Schamberger
>         Attachments: generate_unicode_tables.php, lower_to_upper.php, 
> string_code.diff, string_function_test.php, string_functions.diff, 
> upper_to_lower.php
>
>
> The template functions do not work with UTF-8 data as they only wrap the 
> normal PHP functions. E.g. str_pad_left() does not work as expected.
> I attached the needed string functions. The remaining work is to replace the 
> calls in the string_functions.php with these functions and replace 
> substr/strlen with iconv_substr(), iconv_strlen()...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to