tessl install tessl/pypi-python-bidi@0.6.0Python Bidi layout wrapping the Rust crate unicode-bidi
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.09x
Baseline
Agent success rate without this tile
85%
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