Python Bidi layout wrapping the Rust crate unicode-bidi
Overall
score
93%
A utility that converts logical bidirectional text into its proper visual display order for user interfaces that display mixed left-to-right (LTR) and right-to-left (RTL) text.
Converts right-to-left text from logical storage order to visual display order.
Handles text containing both LTR and RTL scripts with numbers.
Processes text in different character encodings.
@generates
def format_for_display(text, encoding='utf-8'):
"""
Converts bidirectional text to display order.
Args:
text: Input text as str or bytes
encoding: Character encoding for bytes input (default: 'utf-8')
Returns:
Text in visual display order, same type as input (str or bytes)
"""
passProvides bidirectional text algorithm implementation for converting logical text order to visual display order.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-python-bididocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10