When my page is load then special characters are converted.
Što å
ø to Ã
More also
I don't want these to be change. What should i do. Is there any option to edit in htaccess file. When i remove my htccess file code then these characters are not changed.
My htccess file code:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
#Pagination Pages Url
RewriteCond %{THE_REQUEST} \s/+Spare-og-Laresenter(?:\.php)?\?tpages=([^&]+)&page=([^&\s]+) [NC]
RewriteRule ^ Spare-og-Laresenter/%1/%2? [R,L]
RewriteRule ^Spare-og-Laresenter/([^/]+)/([^/]+)$ Spare-og-Laresenter.php?tpages=$1&page=$2 [L,QSA]
#Postdetail.php page url
RewriteCond %{THE_REQUEST} \s/+blogg(?:\.php)?\?postid=([^\&\ ]+) [NC]
RewriteRule ^ blogg/%1? [R,L]
RewriteRule ^blogg/([^\&\ ]+)/?$ blogg.php?postid=$1 [L,QSA]
#Spare-og-Laresenter.php page url for category
RewriteCond %{THE_REQUEST} \s/+Spare-og-Laresenter(?:\.php)?\?catname=([^\&\ ]+) [NC]
RewriteRule ^ Spare-og-Laresenter/%1? [R,L]
RewriteRule ^Spare-og-Laresenter/([^\&\ ]+)/?$ Spare-og-Laresenter.php?catname=$1 [L,QSA]
## hide .php extension snippet
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} \s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]
# To internally forward /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
Do you have try to use charset in HTAccess: http://www.askapache.com/htaccess/setting-charset-in-htaccess.html
for example:
AddCharset UTF-8 .html
Probably you are not defining your charset in the header. Always define the charset to the browser using the meta tags. Use the following tag in your header.
<meta charset='UTF-8' >
Without knowing what character encoding your files are using I will assume it is UTF-8. But to debug you can swap UTF-8 with ISO-8859-1, Windows-1252, or other encoding types.
If you provide a link to a sample page we can further diagnose the issue.
You should be able to fix the majority of the issue by adding AddDefaultCharset
to your .htaccess file under the Options
setting like so:
Options +FollowSymLinks -MultiViews
AddDefaultCharset UTF-8
# Turn mod_rewrite on
RewriteEngine On
You can alternatively limit the impact by using AddType "text/html; charset=UTF-8" .php
or use a file match like
<FilesMatch "\.(htm|html|css|js|php)$">
AddDefaultCharset UTF-8
</FilesMatch>
if you do not want to affect other files.
Also ensure your PHP files do not have an additional header('Content-Type: text/html; charset=---')
;
You should also check your browser's character encoding setting to ensure it is set to automatic as opposed to ISO-8859-1 or something else.