Page 1 of 1

Norwegian letters in PHP

Posted: Sat Nov 20, 2010 6:08 am
by Eksekiel
Through Dreamweaver CS5 I'm following a tutorial of PHP.

But when I'm using 'echo' line and write a sentence with norwegian letter and then save it to my local testing PHP-server I just get some funny letters instead of my norwegian letters.

If I use norwegian letters inside a html-file and saves it to another local testing serveron my PC, the testing server has no problem showing these norwegian lettes, so I assume that this is a problem inside the local PHP-server

How can I change this so it can show the norwegian letters properly on my local PHP-server on my PC?

Re: Norwegian letters in PHP

Posted: Mon Feb 07, 2011 5:43 pm
by Weirdan
you need to specify correct encoding either via configuration, http header or meta tag in html

Re: Norwegian letters in PHP

Posted: Mon Jul 18, 2011 8:00 pm
by beetree
I'm Swedish and whenever I code I input swedish letters immediately into my editor without any special ascii coding. I think you have an issue with encoding. Use UTF8 _everywhere_ (including in your editor) and I think you should be fine.

/beetree

Re: Norwegian letters in PHP

Posted: Tue Jul 19, 2011 12:26 am
by Apollo
Eksekiel wrote:How can I change this so it can show the norwegian letters properly on my local PHP-server on my PC?
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets

Essential quote from article: It does not make sense to have a string without knowing what encoding it uses. You can no longer stick your head in the sand and pretend that "plain" text is ASCII. There Ain't No Such Thing As Plain Text.