I'm facing an issue with c# and html code that involves special French characters :
<html>
<head>
<link rel="stylesheet" href="~/Content/jquery.treeview.css" />
<script src="~/Content/jquery.cookie.js" type="text/javascript"></script>
<script src="~/Content/jquery.treeview.js" type="text/javascript"></script>
<script type="text/javascript" src="~/Content/demo.js"></script>
<!-- calendrier section-->
<link rel="stylesheet" href="~/Scripts/Calendar/theme.css" />
<link href="~/Scripts/Calendar/fullcalendar.css" rel="stylesheet" />
<link href="~/Scripts/Calendar/fullcalendar.print.css" rel="stylesheet" media="print" />
<script src="~/Scripts/Calendar/fullcalendar.min.js"></script>
<style>
body
{
background-color:#eee;
}
#tree {
background-color:#eee;
}
.affaire {
color:black;
font-size: 16px;
}
.tache {
color:black;
font-size: 12px;
}
.projet {
color:blue;
font-size: 20px;
}
.sequence {
color:blue;
font-size: 16px;
}
#calendar {
width: 900px;
margin: 0 auto;
}
p {
color:white;
font-size: 12px;
}
#status
{
position:absolute;
left:60%;
}
</style>
<style>
input {
border: 1px solid #e2e2e2;
background: #fff;
color: #333;
font-size: 1.2em;
margin: 5px 0 6px 0;
padding: 5px;
width: 300px;
}
a {
font-size:14px;
}
</style>
<script>
$(document).ready(function () {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var tab = [];
var d1 = [];
var m1 = [];
var y1 = [];
var d2 = [];
var m2 = [];
var y2 = [];
var colors = [];
@for(int i =0; i< @Model.Get_List_Tache().Count;i++){
@: d1.push(@Model.Get_List_Tache()[i].Begin_date.Day);
@: m1.push(@Model.Get_List_Tache()[i].Begin_date.Month);
@: y1.push(@Model.Get_List_Tache()[i].Begin_date.Year);
@: d2.push(@Model.Get_List_Tache()[i].End_date.Day);
@: m2.push(@Model.Get_List_Tache()[i].End_date.Month);
@: y2.push(@Model.Get_List_Tache()[i].End_date.Year);
}
d1.reverse();
m1.reverse();
y1.reverse();
d2.reverse();
m2.reverse();
y2.reverse();
@for(int i =0; i< @Model.Get_List_Tache().Count;i++){
@:var e = { title: "Tâche: @Model.Get_List_Tache()[i].Tache_description", start: new Date(y1.pop(), m1.pop() - 1, d1.pop(), 08, 00), end: new Date(y2.pop(), m2.pop() - 1, d2.pop(), 18, 00), allDay: true, color: "@Model.GetColors()[i]", };
@: tab.push(e);
}
$('#calendar').fullCalendar({
theme: true,
header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' },
editable: true,
events: tab
});
});
</script>
</head>
<body>
<table > <tr><td style="background-color:darkcyan; width:30%;"> <p>Tâche en cours</p></td><td style="background-color:black;width:30%"> <p>Tâche terminée</p></td><td style="background-color:darkred;width:30%"> <p>Tâche en urgence</p></td></tr>
</table>
<br />
<br />
<table><tr><td style="" >
</td> <td >
<div id='calendar'></div>
</td>
</tr>
</table>
</body>
</html>
After implementing the code, I encountered this problem:
In the line Tâche: développement
, instead of getting Tâche: développement
, I received
Tâche: d&#233;veloppement
. It seems like the character â
is displayed correctly, but é
is not.
Could you please help me understand the cause of this error? How can it be resolved?