title: How to convert UNICODE characters within a string, to their string representation?
body: <p>Basically I have these strings</p>
  <pre><code>var String1 = 'Concepciu00f3n';
  var String2 = 'u00d1eembucu00fa';
  </code></pre>
  <p>I want to convert them back so that they will look like this:</p>
  <pre><code>var String1 = 'Concepción';
  var String2 = 'Ñeembucú';
  </code></pre>
  <p>I've been searching a lot but I haven't found a solution in js yet</p>
  <p>Edit: This is how the data is stored in my DB</p>
  <pre><code>$.ajax({
              url: 'inc/datos-graficos-data',         
              dataType : &quot;json&quot;,
              type: 'POST',
              data: {
                  q: 'guardar_grafico',
                  id: id,
                  headers: headers,
                  datos: save_data,
                  meta: editor,
                  tipo: tipo_grafico,
                  array: selectedRows,//This is the array with all the strings that gets saved with unicodes
                  excel: excel_format
              },
              async: false,
              beforeSend: function() {
                  //$(&quot;#ventasGrafico&quot;).html(&quot;&lt;img src='images/loading.gif'&gt;&quot;);
              },
              success: function(json) {
                  $('#modal_parseo').modal('hide');
                  //SWAL
                  Swal.fire(
                  'Exito!',
                  json,
                  'success'
                  ).then((result) =&gt; {
                      // Reload the Page
                      location.reload();
                  });
              },
              cache: true
          });
  </code></pre>
  <p>This is what my selectedRows array looks like before I send it via ajax, note that some of the values on the &quot;agrupacion&quot; keys are strings with special characters like &quot;Asunción&quot; or &quot;Ñeembucú&quot;.</p>
  <pre><code>const selectedRows = [
    {agrupacion: 'Asunción', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 105.1, col2016: 108, col2017: 112.2, col2018: 106.9},
    {agrupacion: 'Hombre', col2015: 103, col2016: 106.7, col2017: 115, col2018: 106.8},
    {agrupacion: 'Mujer', col2015: 107.2, col2016: 109.3, col2017: 109.4, col2018: 107.1},
    {agrupacion: 'Concepción', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 77.8, col2016: 79.4, col2017: 82.9, col2018: 74.3},
    {agrupacion: 'Hombre', col2015: 76.4, col2016: 80.2, col2017: 81.3, col2018: 71.5},
    {agrupacion: 'Mujer', col2015: 79.3, col2016: 78.5, col2017: 84.6, col2018: 77.2},
    {agrupacion: 'San Pedro', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 76.8, col2016: 77.7, col2017: 77.2, col2018: 70.2},
    {agrupacion: 'Hombre', col2015: 77.2, col2016: 79.1, col2017: 79.8, col2018: 69.5},
    {agrupacion: 'Mujer', col2015: 76.3, col2016: 76.3, col2017: 74.5, col2018: 70.9},
    {agrupacion: 'Cordillera', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 77.9, col2016: 77.5, col2017: 75.6, col2018: 67.5},
    {agrupacion: 'Hombre', col2015: 76.4, col2016: 78.1, col2017: 73.7, col2018: 67.5},
    {agrupacion: 'Mujer', col2015: 79.5, col2016: 76.7, col2017: 77.6, col2018: 67.5},
    {agrupacion: 'Guairá', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 67.8, col2016: 64.8, col2017: 67.3, col2018: 63.2},
    {agrupacion: 'Hombre', col2015: 66.6, col2016: 65.9, col2017: 66.5, col2018: 63.5},
    {agrupacion: 'Mujer', col2015: 69, col2016: 63.7, col2017: 68.2, col2018: 62.9},
    {agrupacion: 'Caaguazú', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 75, col2016: 74.5, col2017: 76.5, col2018: 73.2},
    {agrupacion: 'Hombre', col2015: 75.3, col2016: 73.4, col2017: 75.4, col2018: 72.6},
    {agrupacion: 'Mujer', col2015: 74.7, col2016: 75.7, col2017: 77.6, col2018: 73.9},
    {agrupacion: 'Caazapá', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 63.6, col2016: 56.6, col2017: 59.8, col2018: 57.1},
    {agrupacion: 'Hombre', col2015: 63.9, col2016: 55.6, col2017: 59.6, col2018: 57.4},
    {agrupacion: 'Mujer', col2015: 63.2, col2016: 57.5, col2017: 59.9, col2018: 56.8},
    {agrupacion: 'Itapúa', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 74.3, col2016: 69.6, col2017: 66.2, col2018: 63.7},
    {agrupacion: 'Hombre', col2015: 73.6, col2016: 69.1, col2017: 67.7, col2018: 65.4},
    {agrupacion: 'Mujer', col2015: 75.2, col2016: 70.1, col2017: 64.7, col2018: 62},
    {agrupacion: 'Misiones', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 79.4, col2016: 74.6, col2017: 79.2, col2018: 72.9},
    {agrupacion: 'Hombre', col2015: 81.3, col2016: 72.7, col2017: 77.9, col2018: 72.9},
    {agrupacion: 'Mujer', col2015: 77.4, col2016: 76.5, col2017: 80.5, col2018: 72.9},
    {agrupacion: 'Paraguarí', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 67.2, col2016: 66, col2017: 63.5, col2018: 62.7},
    {agrupacion: 'Hombre', col2015: 67.7, col2016: 67.2, col2017: 65, col2018: 62.3},
    {agrupacion: 'Mujer', col2015: 66.7, col2016: 64.8, col2017: 62, col2018: 63.1},
    {agrupacion: 'Alto Paraná', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 98.9, col2016: 92.8, col2017: 94.2, col2018: 92.3},
    {agrupacion: 'Hombre', col2015: 97, col2016: 93.4, col2017: 94.3, col2018: 92.5},
    {agrupacion: 'Mujer', col2015: 100.8, col2016: 92.2, col2017: 94.2, col2018: 92.1},
    {agrupacion: 'Central', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 87, col2016: 85.2, col2017: 90.3, col2018: 83.5},
    {agrupacion: 'Hombre', col2015: 86.6, col2016: 84.5, col2017: 90.6, col2018: 83.5},
    {agrupacion: 'Mujer', col2015: 87.5, col2016: 86, col2017: 90, col2018: 83.4},
    {agrupacion: 'Ñeembucú', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 68.4, col2016: 67, col2017: 70.3, col2018: 69.9},
    {agrupacion: 'Hombre', col2015: 63.9, col2016: 69.8, col2017: 69.7, col2018: 65.5},
    {agrupacion: 'Mujer', col2015: 73.1, col2016: 64.1, col2017: 70.9, col2018: 74.5},
    {agrupacion: 'Amambay', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 98, col2016: 100.4, col2017: 100.8, col2018: 95.1},
    {agrupacion: 'Hombre', col2015: 99.8, col2016: 100.5, col2017: 101.9, col2018: 97.5},
    {agrupacion: 'Mujer', col2015: 96.1, col2016: 100.3, col2017: 99.6, col2018: 92.5},
    {agrupacion: 'Canindeyú', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 79.5, col2016: 82.3, col2017: 85, col2018: 82.2},
    {agrupacion: 'Hombre', col2015: 77.6, col2016: 79.9, col2017: 82.2, col2018: 82.1},
    {agrupacion: 'Mujer', col2015: 81.5, col2016: 84.7, col2017: 88, col2018: 82.4},
    {agrupacion: 'Presidente Hayes', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 82, col2016: 81.8, col2017: 87.5, col2018: 78},
    {agrupacion: 'Hombre', col2015: 82.9, col2016: 78.6, col2017: 88.5, col2018: 81.3},
    {agrupacion: 'Mujer', col2015: 81.1, col2016: 85.2, col2017: 86.4, col2018: 74.6},
    {agrupacion: 'Boquerón', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 99.3, col2016: 103.7, col2017: 97.6, col2018: 111.1},
    {agrupacion: 'Hombre', col2015: 98.2, col2016: 107.4, col2017: 100.8, col2018: 112.3},
    {agrupacion: 'Mujer', col2015: 100.4, col2016: 99.8, col2017: 94.3, col2018: 109.8},
    {agrupacion: 'Alto Paraguay', col2015: 0, col2016: 0, col2017: 0, col2018: 0},
    {agrupacion: 'Total', col2015: 83, col2016: 75.2, col2017: 88.7, col2018: 81.6},
    {agrupacion: 'Hombre', col2015: 88, col2016: 77, col2017: 92, col2018: 90.1},
    {agrupacion: 'Mujer', col2015: 77.7, col2016: 73.4, col2017: 85.2, col2018: 72.9}];
  </code></pre>
  <p>datos-graficos-data.php file:</p>
  <pre><code>&lt;?php
  $q = $_REQUEST['q'];
  switch ($q) {
     case 'guardar_grafico':
          $db = DataBase::conectar();
          $id = $_REQUEST['id'];//ID
          $froala = $db-&gt;clearText($_REQUEST['meta']);
          $tipo_grafico = $db-&gt;clearText($_REQUEST['tipo']);
          $tipo_excel = $db-&gt;clearText($_REQUEST['excel']);
          $datos_grafico = $_REQUEST['datos'];//OBJECT ARRAY
          $cabecera_grafico = $_REQUEST['headers'];//ARRAY HEADER EX=[2015,2016,2017,ETC]
          $array = $_REQUEST['array'];//ARRAY OF SELECTED DATA
          $json_encoded_array = json_encode($array); //JSON_ENCODE TO STORE IN DB
          
          //IRRELEVANT CODE HERE
  
          //UPDATE DATA, THIS IS WHERE THAT ARRAY IS SAVED
          $db-&gt;setQuery(&quot;UPDATE indicadores SET 
          datos='$froala',
          tipo_excel='$tipo_excel',
          tipo_grafico='$tipo_grafico',
          datos_grafico='$json_encoded_array'
          WHERE id_indicador=$id&quot;);
          if(!$db-&gt;alter()){
              echo &quot;Error: &quot;. $db-&gt;getError();
              $db-&gt;rollback();  //REVERT CHANGES                
          exit;
          }
  
          $db-&gt;commit();
  
          echo json_encode('Data saved successfully');
      break;
  }
  </code></pre>