Commit d123e50b authored by matt@zope.com's avatar matt@zope.com

Add unicode methods "unichr" and "unicode" as unrestricted methods. Note

that the issues remain to allowing unicode objects through Zope that are
not addressed herin, but are related to type('') not equalling type(u''); much
special case code exists that handles strings differently that needs
review to handle unicode as well.
parent 8df1f88d
......@@ -191,6 +191,15 @@ functions: DTML Functions
default is given, the default is returned. If no condition is true
and there is no default, None is returned.
unichr(number) -- Return a unicode string representing the value of
number as a unicode character. This is the inverse of ord() for
unicode characters.
unicode(string[, encoding[, errors ] ]) -- Decodes string using the
codec for encoding. Error handling is done according to errors. The
default behavior is to decode UTF-8 in strict mode, meaning that
encoding errors raise ValueError.
Attributes
None -- The 'None' object is equivalent to the Python built-in object
......
......@@ -84,7 +84,7 @@
##############################################################################
from __future__ import nested_scopes
__version__='$Revision: 1.4 $'[11:-2]
__version__='$Revision: 1.5 $'[11:-2]
import new
......@@ -93,6 +93,7 @@ for name in ('None', 'abs', 'chr', 'divmod', 'float', 'hash', 'hex', 'int',
'len', 'max', 'min', 'oct', 'ord', 'round', 'str', 'pow',
'apply', 'callable', 'cmp', 'complex', 'isinstance',
'issubclass', 'long', 'repr', 'range', 'list', 'tuple',
'unichr', 'unicode',
'Exception',
'ArithmeticError', 'AssertionError', 'AttributeError',
'EOFError', 'EnvironmentError', 'FloatingPointError',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment