如何在 unicode 中管理混合 LTR 和 RTL 语言? [英] How mixing LTR and RTL languages is managed in unicode?

查看:57
本文介绍了如何在 unicode 中管理混合 LTR 和 RTL 语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我们必须在显示中显示消息,这是 RTL 和 LTR 语言的混合.该消息采用 unicode 格式.那么,unicode 如何处理混合呢?是否对平台有任何依赖性?

Sometimes we have to show messages in display which is a mixing of RTL and LTR languages. The message is in unicode. So, how unicode handle the mixing? Is there any dependency on the platform?

推荐答案

该过程由此处描述的 Unicode 双向算法描述:http://www.unicode.org/reports/tr9/.

The process is described by the Unicode bidirectional algorithm described here: http://www.unicode.org/reports/tr9/.

默认情况下,文本从左到右(级别 0).Unicode 具有特殊字符代码来分隔级别 0(级别 1)内的 RTL 文本.您可以使用特殊字符在 RTL 等中分隔 LTR.我认为您最多可以有 61 级嵌入.

By default, text is left to right (level 0). Unicode has special character codes to delimit RTL text within level 0 (level 1). You use special characters to delimit LTR within RTL and so on. I think you can have up to 61 levels of embedding.

HTML 标签具有dir"属性来指定默认方向.

HTML tags have the "dir" attribute to specify the default direction.

该过程是平台中立的,但您将依赖于 unicode 算法来使其正确.

The process is platform neutral, but you will be relying on the unicode algorithm to get it right.

这篇关于如何在 unicode 中管理混合 LTR 和 RTL 语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆