How to use utf8

Comprehensive utf8 code examples:

How to use utf8.encode:

1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
if (data.message_text && data.telegram_id) {
  var apiTelegram = "https://api.telegram.org/bot";
  apiTelegram += PublikFungsi.botTelegram + "/sendMessage?";
  apiTelegram += "parse_mode=HTML";
  apiTelegram += "&chat_id=" + data.telegram_id;
  apiTelegram += "&text=" + utf8.encode(data.message_text);

  fetch(apiTelegram)
    .then((response) => response.json())
    .then((data_json) => {