Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _10.Unicode_Characters
- {
- class Unicode_Characters
- {
- static void Main(string[] args)
- {
- string str = Console.ReadLine();
- byte[] unibyte = Encoding.Unicode.GetBytes(str);
- StringBuilder uniString = new StringBuilder();
- for (byte i = 0; i < unibyte.Length; i++)
- {
- if (unibyte[i] > 0)
- {
- uniString = uniString.AppendFormat("{0}{1}", @"\u", unibyte[i].ToString("X4").ToLower());
- }
- }
- Console.WriteLine(uniString);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement