0

My code to create my table head is the following:

CreateHeadTable(idDes, idT, ["#", "Empresa", "Dirección", "Consultar"]);

function CreateHeadTable(idDest, idT, arrayHead){
    var mytable = document.createElement("TABLE");
    mytable.setAttribute("id", idT);
    mytable.className = "display";
    mytable.cellPadding = 0;
    mytable.width = "100%";

    var thead = document.createElement("THEAD");
    mytable.appendChild(thead);

    var tr = document.createElement("tr");
    thead.appendChild(tr);

    var th, cell;

    for(var row = 0; row < arrayHead.length; row++) {
        th = document.createElement("th");
        cell = document.createTextNode(arrayHead[row].toString());
        th.appendChild(cell);
        tr.appendChild(th);     
    }

    document.getElementById(idDest).appendChild(mytable);
    iniciarTabla(idT);   
}

enter image description here That word should be: "Dirección" and not "Direcci?n"

I'm using visual studio 2010 and MVC asp.net with razor cshtml and I put this in my layout main

<head> <meta content="text/html; charset=ISO-8859-1" /> </head>

there any way to fix that ??

3
  • Is that a js file? Is that source file encoded as ISO-8859-1? Commented May 18, 2016 at 11:27
  • No, it's in the razor file__ my js are separate. Commented May 18, 2016 at 14:19
  • Then you will need to tell ASP to use the ISO-8859-1 to encode the response. See this question Commented May 18, 2016 at 15:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.