Phoenix Logo

phoenix_title wx.UniChar

This class represents a single Unicode character.

It can be converted to and from char or wchar_t and implements commonly used character operations.


class_hierarchy Class Hierarchy

Inheritance diagram for class UniChar:


method_summary Methods Summary

__init__  
GetAsChar Returns True if the character is representable as a single byte in the current locale encoding.
GetValue Returns Unicode code point value of the character.
IsAscii Returns True if the character is an ASCII character (i.e. if its value is less than 128).

property_summary Properties Summary

Value See GetValue

api Class API



class wx.UniChar(object)

Possible constructors:

UniChar(c)

UniChar(c)

This class represents a single Unicode character.


Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self, c)

Parameters:c (long) –



__init__ (self, c)

Parameters:c (long) –





GetAsChar(self, c)

Returns True if the character is representable as a single byte in the current locale encoding.

This function only returns True if the character can be converted in exactly one byte, e.g. it only returns True for 7 bit ASCII characters when the encoding used is UTF-8.

It is mostly useful to test if the character can be passed to functions taking a int and is used by wxWidgets itself for this purpose.

Parameters:c (int) – An output pointer to the value of this Unicode character as a char . Must be not None.
Return type:bool
Returns:True if the object is an 8 bit int and c was filled with its value as int or False otherwise (c won’t be modified then).

New in version 2.9.1.

See also

IsAscii



GetValue(self)

Returns Unicode code point value of the character.

Return type:value_type


IsAscii(self)

Returns True if the character is an ASCII character (i.e. if its value is less than 128).

Return type:bool

Properties



Value

See GetValue