Python Unicodedata Library functions east_asian_width and mirrored














































Python Unicodedata Library functions east_asian_width and mirrored



Python Unicodedata Library

This module provides access to the Unicode Character Database (UCD) which defines character properties for all the characters present in the Unicode Database.

The next two functions defined here are:
1. unicodedata.east_asian_width(chr)
2. unicodedata.mirrored(chr)

unicodedata.east_asian_width(chr):

This is a function in the unicodedata library in python which returns the East-Asian-Width assigned to the character 'chr' given as the argument to the function.
The return value is in the form of a string which represents the width aspects.
In context of interoperating with the East Asian Legacy character encodings and implementing East Asian Typography, the East Asian width is a characterization of character and it can take two values 'Narrow' and 'Wide'.

 

unicode.mirrored(chr):

Mirroring is the property of the characters, such as parenthesis, whose images are reflected horizontally in text that is laid out right-to-left. 
The mirrored property is important to ensure that the correct characters are used for the desired semantic. This is of particular importance where the name of the character does not indicate the intended semantic.
For example "(" character, while the name indicates that it is a left parenthesis, the character really expresses an open parenthesis—the leading character in a parenthetical phrase, not the trailing one.

This function returns the mirrored property assigned to the character 'chr' as integer. It returns 1 if the character has been identified as a 'mirrored' character in bidirectional text, and 0 otherwise.

 


More Articles of Arkaja Sharan:

Name Views Likes
Python codecs Library Error Handling schemes module functions 43 0
Python codecs Library Error Handler register_error and lookup_error functions 39 0
Python codecs Library Error Handlers 37 0
Python codecs Library open and EncodedFile functions 33 0
Python codecs Library iterencode and iterdecode functions 40 0
Python codecs Library register and unregister functions 33 0
Python codecs Library getreader and getwriter functions 40 0
Python codecs Library getincrementalencoder and getincrementaldecoder 30 0
Python codecs Library getencoder and getdecoder functions 34 0
Python Introduction to codecs Library 53 0
Python fcntl Library flock and lockf functions 36 0
Python fcntl Library fcntl and ioctl functions 49 0
Python Resource Library resource usage functions 48 0
Python Resource Library resource usage symbolic constants 39 0
Python Resource Library Resource Limit Functions 49 0
Python resource library resource limit symbolic constants 44 0
Python Introduction to Resource Library 33 0
Python stringprep Library in_table_d1 and in_table_d2 functions 39 0
Python stringprep Library in_table_c8 and in_table_c9 functions 42 0
Python stringprep Library in_table_c5 in_table_c6 and in_table_c7 functions 30 0
Python stringprep Library in_table_c3 and in_table_c4 functions 41 0
Python stringprep library in_table_c21 in_table_c22 and in_table_c21_c22 31 0
Python stringprep library functions in_table_c11 in_table_c12 and in_table_c11_c12 44 0
Python Introduction to stringprep Library 42 0
Python unicodedata library is_normalized unidata_version and ucd_3_2_0 41 0
Python Unicodedata Library functions normalize and decomposition 74 0
Python Unicodedata Library functions east_asian_width and mirrored 40 1
Python Unicodedata Library category bidirectional and combining functions 68 0
Introduction to Unicodedata library lookup and name functions 41 0
Unicode Library decimal digit and numeric functions 40 0
Introduction to Unicode Data library 0 0

Comments