Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript UTF8字符串在HTML iOS中未正确呈现?_Javascript_Html_Ios_Uiwebview - Fatal编程技术网

Javascript UTF8字符串在HTML iOS中未正确呈现?

Javascript UTF8字符串在HTML iOS中未正确呈现?,javascript,html,ios,uiwebview,Javascript,Html,Ios,Uiwebview,在我的项目中,我将区域语言(malayalam)文本(长度:1900)从xcode WebViewDidFinishLoad传递到用html页面编写的javascript函数 function loadArticle(heading, img, desc, date){ document.body.scrollTop = 0; if(img == null || img == "null"){ document

在我的项目中,我将区域语言(malayalam)文本(长度:1900)从xcode WebViewDidFinishLoad传递到用html页面编写的javascript函数

 function loadArticle(heading, img, desc, date){
            document.body.scrollTop = 0;

            if(img == null || img == "null"){ 
                document.getElementById("image").style.display = "none";
            }else{
                addImg(img);
                document.getElementById("image").style.display = "block";

            }

            addHeading(heading);
            addDesc(desc);
            addDate(date);
        }


    function addDesc(desc){
            alert(desc); //is working fine . i can see my big text here
            document.getElementById('description').innerHTML = desc;
            return desc;
    }
我也在使用这些元标记

<meta charset="UTF-8">
<script type="text/javascript" charset="UTF-8">
在我的html部分

<body>
        <div id="heading" style="font-size:26px;"></div>
        <h6 id="date"></h6>
        <p>
            <img id="image" src="" width="auto" width="auto" style="margin-right:10px;margin-bottom:0px;"/>
            <span id="description" width="320" style="font-size:18px;"> </span>
        </p>
    </body>


当我在xcode中硬编码并传递大文本时,它工作正常(任何语言),但当我从xml解析并将值从xcode传递到html时,它不会显示(javascript警报显示正确的值)

请帮忙

<body>
        <div id="heading" style="font-size:26px;"></div>
        <h6 id="date"></h6>
        <p>
            <img id="image" src="" width="auto" width="auto" style="margin-right:10px;margin-bottom:0px;"/>
            <span id="description" width="320" style="font-size:18px;"> </span>
        </p>
    </body>