Welcome Guest, Not a member yet? Register   Sign In
utf8 problem (solved)
#1

[eluser]Aspen[/eluser]
Hi all!
I´m new to codeigniter, and with my first project I have run in to a problem.
I can´t output special characters like å, ä and ö (Swedish),
* NOT using paragraph tags
* NOT using php echo with paragraph tags
* NOT using php echo without paragraph tags

however using php echo utf8_encode(); works great, and so does getting the strings from the database.

I have set:

* my database and my tables to: utf8_unicode_ci.
* my meta tags to:
<meta http-equiv="content-type" content="text/html; charset=<?php echo config_item('charset'); ?>" />
* my config to: $config['charset'] = "UTF-8";

what am I doing wrong?
#2

[eluser]LuckyFella73[/eluser]
Did you save your view files UTF-8 encoded? I don't know what kind
of editor you are using - when I klick "save as" I can decide
if the file should be saved "utf-8" encoded or whatever I want
(from the list).

I suggest to check this out first.

hej hej
#3

[eluser]Aspen[/eluser]
Thanks a lot!

you where right... the strange thing was that I had created a "site-project" in dremweawer and whenever i wanted to create a new file, I just right-clicked and selected 'new file'. this created files in the wrong encoding...

however just going into the menu file->new file created files in the correct encoding!




Theme © iAndrew 2016 - Forum software by © MyBB