Reputation: 19
i was working on french site fully in cakephp,but it was causing file type encoding to embedd the characters to html .So i changed file type to encode in utf-8
in notepad++.but its causing problem and giving whitespace and head tags coming in body of html like this-

<meta content="IE=EmulateIE9" http-equiv="X-UA-Compatible">
<meta content="IE=EmulateIE8" http-equiv="X-UA-Compatible">
<title> : test</title>
<link rel="icon" type="image/x-icon" href="/mapubvideoRel/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="/mapubvideoRel/favicon.ico">
<link href="/mapubvideoRel/css/main.css" type="text/css" rel="stylesheet">
<link href="/mapubvideoRel/css/helper.css" type="text/css" rel="stylesheet">
<link href="/mapubvideoRel/css/general.css" type="text/css" rel="stylesheet">
<link href="/mapubvideoRel/css/colorbox.css" type="text/css" rel="stylesheet">
<link href="/mapubvideoRel/css/App_Popup.css" type="text/css" rel="stylesheet">
<script src="/mapubvideoRel/js/jquery.js" type="text/javascript">
<script src="/mapubvideoRel/js/popup.js" type="text/javascript">
<script src="/mapubvideoRel/js/jquery.colorbox-min.js" type="text/javascript">

please help. Thanks
Upvotes: 1
Views: 719
Reputation: 575
I am also getting this problem in my MVC6 web application.
I have added below line in my layout page on very top & problem is resolved.
<?xml version="1.0" encoding="UTF-8" ?>
Upvotes: 0
Reputation: 530
you have file with BOM char . use BOM Detector program
java : http://www.javapractices.com/topic/TopicAction.do?Id=257 [recommended][find and remove]
1- check URL for exist BOM
2- remove BOM from your file
php : http://www.dotvoid.com/2010/04/detecting-utf-bom-byte-order-mark/
Upvotes: 1