language specific character in the web page

7 views
Skip to first unread message

Sajjadul Islam

unread,
Apr 29, 2015, 8:03:06 PM4/29/15
to d3...@googlegroups.com
Hello forum,

I am loading a .csv file that contains data in the following format:

/////////////////////////////////////////////////////////////////////////////

"region","party","Year=2014"
"0114 Upplands Väsby","Moderaterna",28.4
"0114 Upplands Väsby","Centerpartiet",3.7
"0114 Upplands Väsby","Folkpartiet",6.1
"0114 Upplands Väsby","Kristdemokraterna",4.5
"0114 Upplands Väsby","Miljöpartiet",6.8
"0114 Upplands Väsby","Socialdemokraterna",30.3
"0114 Upplands Väsby","Vänsterpartiet",5.8
"0114 Upplands Väsby","Sverigedemokraterna",10.9


/////////////////////////////////////////////////////////////////////////////

As you can see , there are some character like "ä", "ö" in the data. When I read the data and display them on the page(using the google chrome), I see the following:


/////////////////////////////////////////////////////////////////////////////////

0114 Upplands V�sby *** Moderaterna ***

0114 Upplands V�sby *** Centerpartiet ***

0114 Upplands V�sby *** Folkpartiet ***

0114 Upplands V�sby *** Kristdemokraterna ***

0114 Upplands V�sby *** Milj�partiet ***

0114 Upplands V�sby *** Socialdemokraterna ***

0114 Upplands V�sby *** V�nsterpartiet ***

0114 Upplands V�sby *** Sverigedemokraterna ***

0114 Upplands V�sby *** �vriga partier ***

0114 Upplands V�sby *** ogiltiga valsedlar ***

0114 Upplands V�sby *** ej r�stande ***




/////////////////////////////////////////////////////////////////////////////////

You can see that those characters the replaced by the question mark sign. Any hint to represent the actual character as found in the dataset ?

It may sound like off-topic here, but please do forward me the proper forum to address the issue.


Thanks
Sajjadul

John Delacour

unread,
Apr 30, 2015, 4:04:50 PM4/30/15
to d3...@googlegroups.com
On 30 Apr 2015, at 01:03, Sajjadul Islam <sajjadul...@gmail.com> wrote:

I am loading a .csv file that contains data in the following format:

"region","party","Year=2014"
"0114 Upplands Väsby","Moderaterna",28.4

Make sure the encoding of the text file is UTF-8 and specify this encoding in the header of the html file

<head>
[HTML 4.01:]
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
[HTML5:]
<meta charset="UTF-8">
</head>

JD

Reply all
Reply to author
Forward
0 new messages