Welcome Guest, Not a member yet? Register   Sign In
Codeigniter UTF-8 in loaded view within another view
#1

(This post was last modified: 08-28-2015, 02:39 PM by ZeroNine.)

I'm having a strange issue with loaded views in Codeigniter 3.0.1. I'm trying to display Spanish characters within my application. I have set these settings below to get Spanish displaying properly in the initial view loaded from my controller.

This is set in the main index.php of codeigniter.
Code:
header('Content-Type: text/html; charset=utf-8');


I also have set this on the top of my HTML page mark up.
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

So Spanish characters in the main HTML page is displaying properly. The problem is when I try to load another view inside the main HTML file.
Code:
<html>
<body>

  spanish here //displays properly

  <?php $this->load->view("page/somepage"); //Spanish in view does not format properly ?>

</body>
</html>

Any Spanish characters loaded inside this "somepage" view is not formatting properly.
Is this a bug?
Reply


Messages In This Thread
Codeigniter UTF-8 in loaded view within another view - by ZeroNine - 08-28-2015, 02:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB