久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='ndXjR'></bdo><ul id='ndXjR'></ul>

  • <small id='ndXjR'></small><noframes id='ndXjR'>

      <legend id='ndXjR'><style id='ndXjR'><dir id='ndXjR'><q id='ndXjR'></q></dir></style></legend>
      <tfoot id='ndXjR'></tfoot>
    1. <i id='ndXjR'><tr id='ndXjR'><dt id='ndXjR'><q id='ndXjR'><span id='ndXjR'><b id='ndXjR'><form id='ndXjR'><ins id='ndXjR'></ins><ul id='ndXjR'></ul><sub id='ndXjR'></sub></form><legend id='ndXjR'></legend><bdo id='ndXjR'><pre id='ndXjR'><center id='ndXjR'></center></pre></bdo></b><th id='ndXjR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ndXjR'><tfoot id='ndXjR'></tfoot><dl id='ndXjR'><fieldset id='ndXjR'></fieldset></dl></div>

        如何在 C# 中獲取 unicode 字符的十進制值?

        How do i get the decimal value of a unicode character in C#?(如何在 C# 中獲取 unicode 字符的十進制值?)

            • <small id='Pllaj'></small><noframes id='Pllaj'>

                <bdo id='Pllaj'></bdo><ul id='Pllaj'></ul>

                    <tbody id='Pllaj'></tbody>
                • <i id='Pllaj'><tr id='Pllaj'><dt id='Pllaj'><q id='Pllaj'><span id='Pllaj'><b id='Pllaj'><form id='Pllaj'><ins id='Pllaj'></ins><ul id='Pllaj'></ul><sub id='Pllaj'></sub></form><legend id='Pllaj'></legend><bdo id='Pllaj'><pre id='Pllaj'><center id='Pllaj'></center></pre></bdo></b><th id='Pllaj'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Pllaj'><tfoot id='Pllaj'></tfoot><dl id='Pllaj'><fieldset id='Pllaj'></fieldset></dl></div>
                  <legend id='Pllaj'><style id='Pllaj'><dir id='Pllaj'><q id='Pllaj'></q></dir></style></legend>

                  <tfoot id='Pllaj'></tfoot>
                  本文介紹了如何在 C# 中獲取 unicode 字符的十進制值?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何在 C# 中獲取 unicode 字符的數值?

                  例如,如果泰米爾語字符 ? (

                  解決方案

                  和Java基本一樣.如果您將它作為 char 獲得,則可以隱式轉換為 int:

                  char c = 'u0b85';//隱式轉換:char 基本上是一個 16 位無符號整數詮釋 x = c;Console.WriteLine(x);//打印 2949

                  如果您將它作為字符串的一部分,請先獲取該單個字符:

                  string text = GetText();int x = 文本[2];//管他呢...

                  請注意,不在基本多語言平面中的字符將表示為兩個 UTF-16 代碼單元. .NET 支持查找完整的 Unicode 代碼點,但它并不簡單.

                  How do i get the numeric value of a unicode character in C#?

                  For example if tamil character ? (U+0B85) given, output should be 2949 (i.e. 0x0B85)

                  See also

                  • C++: How to get decimal value of a unicode character in c++
                  • Java: How can I get a Unicode character's code?

                  Multi code-point characters

                  Some characters require multiple code points. In this example, UTF-16, each code unit is still in the Basic Multilingual Plane:

                  • (i.e. U+0072 U+0327 U+030C)
                  • (i.e. U+0072 U+0338 U+0327 U+0316 U+0317 U+0300 U+0301 U+0302 U+0308 U+0360)

                  The larger point being that one "character" can require more than 1 UTF-16 code unit, it can require more than 2 UTF-16 code units, it can require more than 3 UTF-16 code units.

                  The larger point being that one "character" can require dozens of unicode code points. In UTF-16 in C# that means more than 1 char. One character can require 17 char.

                  My question was about converting char into a UTF-16 encoding value. Even if an entire string of 17 char only represents one "character", i still want to know how to convert each UTF-16 unit into a numeric value.

                  e.g.

                  String s = "?";
                  
                  int i = Unicode(s[0]);
                  

                  Where Unicode returns the integer value, as defined by the Unicode standard, for the first character of the input expression.

                  解決方案

                  It's basically the same as Java. If you've got it as a char, you can just convert to int implicitly:

                  char c = 'u0b85';
                  
                  // Implicit conversion: char is basically a 16-bit unsigned integer
                  int x = c;
                  Console.WriteLine(x); // Prints 2949
                  

                  If you've got it as part of a string, just get that single character first:

                  string text = GetText();
                  int x = text[2]; // Or whatever...
                  

                  Note that characters not in the basic multilingual plane will be represented as two UTF-16 code units. There is support in .NET for finding the full Unicode code point, but it's not simple.

                  這篇關于如何在 C# 中獲取 unicode 字符的十進制值?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                  XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                  Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                  Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                  delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                  Parse malformed XML(解析格式錯誤的 XML)
                      <tbody id='WLznq'></tbody>

                      <legend id='WLznq'><style id='WLznq'><dir id='WLznq'><q id='WLznq'></q></dir></style></legend>

                      <small id='WLznq'></small><noframes id='WLznq'>

                      1. <tfoot id='WLznq'></tfoot>
                          <i id='WLznq'><tr id='WLznq'><dt id='WLznq'><q id='WLznq'><span id='WLznq'><b id='WLznq'><form id='WLznq'><ins id='WLznq'></ins><ul id='WLznq'></ul><sub id='WLznq'></sub></form><legend id='WLznq'></legend><bdo id='WLznq'><pre id='WLznq'><center id='WLznq'></center></pre></bdo></b><th id='WLznq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WLznq'><tfoot id='WLznq'></tfoot><dl id='WLznq'><fieldset id='WLznq'></fieldset></dl></div>
                          • <bdo id='WLznq'></bdo><ul id='WLznq'></ul>
                            主站蜘蛛池模板: 欧美视频二区 | 久久久青草婷婷精品综合日韩 | 在线看av的网址 | 国内在线视频 | 欧美精品中文 | 浴室洗澡偷拍一区二区 | 欧美成人精品欧美一级 | 欧美一区二区三区 | 欧美日韩国产在线观看 | 操久久| 成人福利视频 | 人人鲁人人莫人人爱精品 | av网站免费在线观看 | 国内成人免费视频 | 日韩精品一区二区三区中文字幕 | 蜜桃精品视频在线 | 久久久久久免费免费 | 精品丝袜在线 | 久久久爽爽爽美女图片 | 人干人人 | 中文一级片 | 欧美一区视频 | 日韩一区二区在线视频 | 午夜激情视频在线 | 欧美精品一区二区三区四区 在线 | 日韩在线视频一区 | 精品一区av| av色在线| 国产高潮好爽受不了了夜色 | 狠狠躁天天躁夜夜躁婷婷老牛影视 | 国内成人免费视频 | 免费在线一区二区 | 成人欧美一区二区三区1314 | 国产在线视频在线观看 | 在线观看中文字幕 | 久久国产麻豆 | 国产精品久久久久久久午夜片 | 亚洲三区在线观看 | 欧美电影一区 | 欧美99| 一区二区在线免费观看 |