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
Post a Comment