Character encoding in javascript file and a simple php file -


i got problem special characters. have defined meta tag as

<meta http-equiv="content-type" content="text/html; charset=utf-8" />  

so far good. in 1 occassion have select tag many options many special characters. got problem showing (å ä ö). defined in .js file , appended document using dom. pls. there solution except using &... forgot name type.

second character problem have in php. try send email amazon ses.

<?php  $message['body.html.data'] = "please confirm tönt clicking on link"." ....<a href='s'>tönt</a>"; $message['body.html.charset'] = 'utf-8';  ?> 

the ö not showing properly?

you'd better use:

<?php header('content-type: text/html; charset=utf-8'); ?> 

at top of php file, no need use http-equiv metas when can send real http headers ;-)

also check if files (both php , js) encoded in utf8 in editor. setting utf8 header on non utf8 files produce strange results sure!


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -