ZF-12498: Zend_Measure_Length bad encoding

Issue Type: Bug Created: 2013-01-04T13:19:26.000+0000 Last Updated: 2013-01-09T11:58:01.000+0000 Status: Resolved Fix version(s): - 1.12.2 (25/Feb/13)

Reporter: Nicolas GIRAUD (niconoe) Assignee: Frank Brückner (frosch) Tags: - Zend_Measure

Related issues: Attachments: - Length.php.patch


On the unit array in Zend_Measure_Length, there're some encoding errors. Even if I'm in UTF-8 I can't see these units correctly :

ANGSTROM must be Å instead of � BICRON must be µµ instead of �� BOHR must be a0 instead of � DOUZIEME_WATCH and DOUZIEME must be douzième instead of douzi�me all MICRO* must be µ... instead of �... MILLIMICRON must be mµ instead of m� PE must be pé instead of p�

All non-ascii characters are currently displayed as �

You can see that is also visible on the documentation :…



Posted by Matthew Weier O'Phinney (matthew) on 2013-01-04T14:16:18.000+0000

What encoding have you set for your locale? and for your output? I suspect we have our output encoding wrong for the API docs, so that's a straw man -- I need to know what conditions you have that are displaying the incorrect encoding. Some sample code would be helpful as well.

Posted by Nicolas GIRAUD (niconoe) on 2013-01-04T14:54:16.000+0000

My locale is FR_fr, with UTF-8 encoding and my output is in UTF-8 too. My IDEs are paramtered in UTF-8 without BOM. I try with Eclipse and Notepad++.

Here are my headers sent by Firefox on the doc : {quote} Content-Length 224261 Content-Type text/html; charset=UTF-8 Date Fri, 04 Jan 2013 14:51:26 GMT ... {quote}

So I'm still in UTF-8.

Looking at your sources for docs, I can see you're using encoding="iso-8859-1" for the xml tag's attribute, so maybe it came from this for the docs.

But I meant those encoding errors are inside Zend's sources. I don't run any sample script using the Zend_Measure_Length on my applications, I just found it. Here is code sample using this package: {quote} {quote}

I hope I helped you to fix it, even if I don't use this package. I just did to make Zend better ;) Thanks

Posted by Frank Brückner (frosch) on 2013-01-04T15:08:27.000+0000

The file Zend/Measure/Length.php is corrupted.

Posted by Nicolas GIRAUD (niconoe) on 2013-01-04T15:12:36.000+0000

Oh bad :(

Won't be fixed? No reported issues about this corruption? I don't find anything on it when searching in your issue tracker


Posted by Frank Brückner (frosch) on 2013-01-04T15:37:19.000+0000

{quote}Won't be fixed? No reported issues about this corruption? I don't find anything on it when searching in your issue tracker{quote} I think, until now, no one has used this units. We will fix this.

Posted by Nicolas GIRAUD (niconoe) on 2013-01-04T15:43:40.000+0000

Great. Thank you!

Posted by Frank Brückner (frosch) on 2013-01-04T15:55:33.000+0000

@Nicolas Please check the patch file and give a feedback. Thanks.

Posted by Frank Brückner (frosch) on 2013-01-04T15:57:57.000+0000

I have used this dictionary as reference:

Posted by Nicolas GIRAUD (niconoe) on 2013-01-04T16:04:22.000+0000

The patch is ok. I used the same dictionary as you as reference in the descrption of this issue.

Thanks a lot for your availability!

Posted by Frank Brückner (frosch) on 2013-01-09T11:58:01.000+0000

Fixed on trunk (25198) and release-1.12 (25199)

Fix used the "SUBSCRIPT ZERO" sign for the unit "Bohr".

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.