So it works, and the answers are given

<?xml version="1.0" encoding="UTF-8"?> <aiml> <category> <pattern>Hello</pattern> <template> <random> <li>Привет. Нормально.</li> <li>Привет. Отлично. Как у тебя?</li> </random> </template> </category> </aiml> 

So instead of the answer gives an empty string.

 <?xml version="1.0" encoding="UTF-8"?> <aiml> <category> <pattern>Привет</pattern> <template> <random> <li>Привет. Нормально.</li> <li>Привет. Отлично. Как у тебя?</li> </random> </template> </category> </aiml> 

How to make it so that when entering Russian letters, he could also give an answer?

 static CuteRobot bot; static void Main(string[] args) { // Console.InputEncoding = Encoding.Unicode; bot = new CuteRobot(); string input, output; while (true) { input = Console.ReadLine(); if (input == "quit") break; output = bot.getOutput(input); Console.WriteLine(output); } } 
  • And the coding at you is exactly utf-8? - VladD
  • Yes, exactly, in NotePad specially transformed "forcibly" there already was UTF8 - Hankook

1 answer 1

 <item name="stripperregex" value="[^0-9a-zA-Zа-яА-Я]"/> 

regex fix and everything will be fine.