tailieunhanh - professional perl programming wrox 2001 phần 10

Các văn bản bên ngoài dấu ngoặc kép có mức nhúng từ 0, trong khi các văn bản trong dấu ngoặc kép (thể hiện trong tất cả HOA và giả định là trong kịch bản tiếng Ả Rập) có một mức độ nhúng của 1. Mỗi cấp độ có một hướng mặc định được gọi là hướng nhúng. | Unicode Simpo PDF Merge and Split Unregistered Version - http The text outside the quotes has an embedding level of 0 whereas the text within the quotes shown in ALL CAPITALS and assumed to be in the Arabic script has an embedding level of 1. Each level has a default direction called the embedding direction. This direction is L left to right if the level number is even and R right to left if the level number is odd. Every paragraph has a default embedding level and thus a default direction associated with it. This is also called the base direction of the paragraph. For example A paragraph with a beginning like this in the Latin script would have a default embedding level as Level 0 and hence its base direction would be left to right. What the bidi Algorithm Does The bidi algorithm uses all these formatting codes and embedding levels for analyzing text to decide how it should be rendered. Here is briefly how it goes about doing it It breaks up the text into paragraphs by locating the paragraph separators. This is necessary because all the directional formatting codes are only effective within a paragraph. Furthermore this is where the base direction is set. The rest of the algorithm treats the text on a paragraph-by-paragraph basis. The directional character types and the explicit formatting codes are used to resolve all the levels of embedding in the text. The text is then broken up into lines and the characters are re-ordered on a line-by-line basis for rendering on the screen. Perl and bidi Since Perl is a language frequently used for text processing it is natural that Perl should have bidi capabilities. We have an implementation of the bidi algorithm on Linux that can be used by Perl. We require a C library named FriBidi which is basically a free implementation of the bidi algorithm written by Dov Grobgeld. A Perl module has also been written by the same author acting as an interface to the C library and is available as from

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.