title: Why can't my translation script handle cyrillic or chinese letters?
body: <p>I'm trying to build a really simple translating script for people who want to say something in their native language and get it translated into english. It works surprisingly well, but it cannot handle cyrillic (or chinese for example) letters at all.</p>
  <pre><code>if(message.content.toLowerCase().startsWith(&quot;+t &quot;)) {
          var args = message.content.substring(3).split(&quot; &quot;);
  if(!args[0]) {
          message.channel.send(&quot;What do you want to translate?&quot;);
          return;
  }
  let gurl = &quot;https://translate.googleapis.com/translate_a/single?client=gtx&amp;sl=auto&amp;tl=english&amp;dt=t&amp;q=&quot; + args.join(&quot;%20&quot;);
  request(gurl, function(error, response, body) {
      try {
          let translated = body.match(/^\[\[\[&quot;.+?&quot;,/)[0];
          translated = translated.substring(4, translated.length - 2);
          message.delete().catch(O_o=&gt;{});
          message.channel.send(&quot;**&quot;+message.author.username+&quot;** (via translator): &quot; + translated);
      } catch(err) {
          message.channel.send(&quot;Failed: &quot;+err);
      }
  });
  
  }
  </code></pre>
  <p><strong>err = TypeError: Cannot read property 'match' of undefined</strong> if I try to translate them. Do I need to encode them somehow compatible to latin first or how should I approach the problem?</p>