Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Utf8 Component Proposal

Proposed Component Name Zend_Utf8
Developer Notes
Proposers Andrea Ercolino
Zend Liaison TBD
Revision 1.0 - 11 January 2011: Initial Draft. (wiki revision: 3)

Table of Contents

1. Overview

Zend_Utf8 is a simple component that offers escape and unescape functionalities.

Encoding PHP values to some other string format, like JSON, could require escaping UTF-8 characters. It respectively goes for decoding and unescaping. I think it's sufficiently justified the existence of a class for basic UTF-8 support in the Zend Framework, so I made up Zend_Utf8, which I'm going to briefly introduce.

Zend_Utf8 exposes six static functions: two are the main functions for escaping and unescaping strings and four are the ancillary functions for mapping UTF-8 characters to unicode integers and the other way around. Usage of the ancillary functions is well documented by the main functions, so I'll describe only usage of the latter.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

4. Dependencies on Other Framework Components

  • Zend_Utf8_Exception

5. Theory of Operation

$escape = Zend_Utf8::escape($string);
$unescape = Zend_Utf8::unescape($string);

6. Milestones / Tasks

  • Milestone 1: [DONE] Working prototype
  • Milestone 2: Unit tests exist, work, and are checked into SVN.
  • Milestone 3: Initial documentation exists.

7. Class Index

  • Zend_Utf8_Exception
  • Zend_Utf8

8. Use Cases


9. Class Skeletons


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.