如何获得Unicode字符的方向性? [英] How do I get the directionality of a unicode character?

查看:154
本文介绍了如何获得Unicode字符的方向性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

unicode规范表明unicode字符知道它的方向,但是我看过的地方都没有解释该信息的存储方式,更重要的是,我如何在win32应用程序中访问它(在此不使用.NET).项目)?

我发现自己必须执行双向比标编码算法( http: //www.unicode.org/reports/tr9/),这样我就可以从左到右显示一个字符串,并准确显示它.一切都很好,但是算法的核心是能够分辨字符的方向和强度(L,R,N,Strong,Weak等).

我可以得到此信息吗?

The unicode specification indicates that a unicode character knows it's direction, but no-where that I have looked explains how that information is stored and, more importantly, how I can access it in a win32 app (not using .NET in this project)?

I find myself in a position of having to impelement the bidi-unicode algorithm (http://www.unicode.org/reports/tr9/) so I can display a string Left to right and have it displayed accurately. That's all well and good but the core of the algorithm is to be able to tell the direction and strength of a character (L, R, N, Strong, Weak etc).

So, any ideas how I can get this imformation?

推荐答案

Visual C ++无法帮助您.它只是一个IDE,而VC附带的类库不是为您的要求而设计的.
Visual C++ can not help you. It is just an IDE, and the class libraries shipped with VC are not designed for your requirement. 

Windows可能已经实现了这种全球化支持.在Windows SDK论坛中询问以查看Windows SDK文档中是否有API.如果没有,请访问开源社区以查看是否有人实施了这样的算法.如果找不到,请自己写一个.
Windows may have implemented such kind of globalization support. Ask in the Windows SDK forum to see if there is an API in Windows SDK documentation. If not, go to open source communities to see if someone has implemented such an algorithm. If you can not find one, write one by yourself.


这篇关于如何获得Unicode字符的方向性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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