Yanipan
Yanipan

Reputation: 664

UTF-8 unreadable in phonegap android

I'm working on my first phonegap application, an android based simple form app.

My problem is that all my non-latin characters appear unreadable. I added the content meta tag with utf-8, made sure I saved the file as utf-8, made sure to use font with the needed letters and also added xml:lang to the decleration.

Couldn't find any other idea, because i'm a web dev and this usually solves these issues...

Maybe someone has any idea? feels like my questions back when I just started web development :) Thanks!

Upvotes: 5

Views: 9886

Answers (3)

mina morsali
mina morsali

Reputation: 778

sometime it happens from visual studio page Unicode setting: for this go to file > advance save options > select Unicode utf 8 with signature and then click ok.

Upvotes: 2

Stanislav Parkhomenko
Stanislav Parkhomenko

Reputation: 504

If you are using Eclipse, which is default for the PhoneGap Android, make sure you applied the utf-8 text file encoding. (Project - Properties - Resource: Text File Encoding - Other [UTF-8]).

The meta tag should also be in your index.html

<head>
   <meta charset=utf-8>
   ...
</head>

Upvotes: 7

Ēriks Daliba
Ēriks Daliba

Reputation: 718

Just add meta:

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

Upvotes: 18

Related Questions