Advertisement
RedFlys

Coding to UTF8

Mar 31st, 2022
1,209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.58 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ООП
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string message = "Шучу! С первым апреля.";
  14.  
  15.             byte[] bytes = Encoding.UTF8.GetBytes(message);
  16.  
  17.             foreach (byte b in bytes)
  18.             {
  19.                 Console.Write(b + ", ");
  20.             }
  21.         }
  22.     }
  23. }
  24.  
  25.  
  26. //208, 151, 208, 180, 208, 181, 209, 129, 209, 140, 32, 208, 186, 208, 190, 209, 129, 208, 176, 209, 128, 209, 143, 32, 208, 189, 208, 181, 209, 130, 46,  Здесь косаря нет.
  27. //208, 151, 208, 180, 208, 181, 209, 129, 209, 140, 32, 209, 130, 208, 190, 208, 182, 208, 181, 32, 208, 189, 208, 181, 209, 130, 46, Здесь тоже нет.
  28. //208, 152, 32, 208, 183, 208, 180, 208, 181, 209, 129, 209, 140, 32, 208, 189, 208, 181, 209, 130, 46, И здесь нет.
  29. //208, 157, 208, 176, 32, 208, 191, 208, 181, 208, 189, 209, 145, 208, 186, 32, 209, 129, 208, 181, 208, 187, 32, 45, 32, 208, 180, 208, 190, 208, 187, 208, 182, 208, 181, 32,
  30. //208, 177, 209, 139, 208, 187, 32, 208, 186, 208, 190, 209, 129, 208, 176, 209, 128, 209, 140, 32, 208, 190, 209, 130, 208, 180, 208, 176, 209, 130, 209, 140, 46,  На пенёк сел - должен был косарь отдать.
  31. //208, 168, 209, 131, 209, 135, 209, 131, 33, 32, 208, 161, 32, 208, 191, 208, 181, 209, 128, 208, 178, 209, 139, 208, 188, 32, 208, 176, 208, 191, 209, 128, 208, 181, 208, 187, 209, 143, 46, Шучу! С первым апреля.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement