Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char[] chars = new char[]
- {
- (char)0xd83d, (char)0xde04,
- };
- byte[] bytes = Encoding.UTF32.GetBytes(chars);
- Console.WriteLine("bytes.Length = " + bytes.Length);
- foreach (var b in bytes)
- {
- Console.WriteLine(b.ToString("x2"));
- }
- bytes.Length = 4
- 04
- f6
- 01
- 00
- bytes.Length = 8
- 04
- f6
- 01
- 00
- 00
- 00
- 00
- 00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement