kingBook

导航

C# 获取字符的Unicode编码

using UnityEngine;
using System.Collections;
using System.Collections.Generic;


List<byte> encodeChars=new List<byte>(64); string chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; for(int i=0;i<64;i++){ char[] sub=chars.ToCharArray(i,1); byte[] bytes=System.Text.Encoding.Unicode.GetBytes(sub); encodeChars.Add(bytes[0]); Debug.Log(encodeChars[i]); }

 

posted on 2016-10-04 21:52  kingBook  阅读(3502)  评论(0编辑  收藏  举报