开发者

Unicode for displaying mathematical operations

How can I display a squared sign in 开发者_运维问答unicode (I checked the Unicode reference and it is not there)?

Also, is it possible to use unicode to display a fraction, for example 3/4 would look as it should with the horizontal vinculum?


For the fraction, you need the combining fraction slash (U+2044): “  ⁄  ”, but you have no guarantee that the client will render it in the same way vulgar fractions such as ¼.

For the squared sign “²”, you'll find it at U+00B2, near all the other superscript digits, and just before the subscript digits.


Take a look here: http://en.wikipedia.org/wiki/Unicode_mathematical_operators_and_symbols

You can then use codes to add symbols to your string.

And also be sure your font supports those symbols. Really unicode fonts with all symbols included are about 10-15MB in size, when regular fonts, even mentioned as unicode, can be only 50-100 KB


Unicode math characters:

  • http://tlt.its.psu.edu/suggestions/international/bylanguage/mathchart.html

Fractions:

  • http://tlt.its.psu.edu/suggestions/international/bylanguage/mathchart.html#fractions

Unicode for square is called superscript 2:

  • ²
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜