javascript "unexpected identifier", probably unicode problem

217 Views Asked by At

When I try to visit this html file, the console gives the error "unexpected identifier".

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
    </head>
    <body>
        <script src="db.js" charset="UTF-8" type="text/javascript"></script>
    </body>
</html>

It gives an error on the first line of the js file. This is because that line contains greek characters. I have encoded both files in UTF-8.

I would really appreciate help!

EDIT: here's an example of the js file:
var items = [{word:"ὁ, ἡ, τό",meaning:"the"}]
But the array has more than nine hundred items like that.

0

There are 0 best solutions below