Search code examples
htmlcordovacharacter-encodinghybrid-mobile-app

character encoding in a html page


I have 2 html pages (index.html and game.html) where I specify the same character encoding UTF-8

in the first page (index.html) every thing works fine but in the second page all characters appear like this �

this is the code of 2 pages :

<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


        <title>  أصوات</title>
    </head>
    <body dir="rtl" lang='ar' class="contentBack">

    </body>
</html>

the result in my browser: result

how can I solve this problem ?


Solution

  • Make sure the file is also saved with the corresponding encoding (in your case UTF8). Setting the right meta charset may not be enough.