kakaini Posted September 16, 2010 Share Posted September 16, 2010 HI!Straight to the point! I have website using letters like ā-ž and Ā-Ž, using UTF-8 encoding. On my local test server i have no problems, but on host it goes all wrong ā-ž and Ā-Ž turns to ?-� and ?-�. I tryed with a uploaded custom font, font which i took from widows folder and with which i had no problems on my local machine.Any ideas? Solutions? Link to comment Share on other sites More sharing options...
Ingolme Posted September 16, 2010 Share Posted September 16, 2010 Your host might not be outputting your page in UTF-8 which would be a problem. I'd do it with PHP to ensure it worked, but since you seem to be posting this in the HTML forum, that might not be an option.<meta> tags aren't always effective, but you could try it: <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 Your host might not be outputting your page in UTF-8 which would be a problem. I'd do it with PHP to ensure it worked, but since you seem to be posting this in the HTML forum, that might not be an option.<meta> tags aren't always effective, but you could try it:<meta http-equiv="Content-type" content="text/html;charset=UTF-8"> I said i'm using UTF-8 encoding and with that i ment the meta you showed.Please tell me about PHP solution....come to think of it, i may have said it wrong. charset not encoding x: Link to comment Share on other sites More sharing options...
jeffman Posted September 16, 2010 Share Posted September 16, 2010 As Ingolme said, <meta> tags don't always work.If your server allows .htaccess files, you can add this line:AddCharset UTF-8 .htmland that will send the correct header with all files ending in .html . No other coding is necessary.If that doesn't work, you can add this code to the top of a .php document:<?php header('Content-type: text/html; charset=utf-8');?> Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 header('Content-type: text/html; charset=utf-8');does'nt work.In .htaccessAddDefaultCharset UTF-8andAddCharset UTF-8 .htmlGot rid of "�", but other letters ar still "?" Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 SORRY FOR THE SPAM. was not on purpouse x: Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 header('Content-type: text/html; charset=utf-8'); does'nt work.In .htaccess AddDefaultCharset UTF-8 does'nt work.And AddCharset UTF-8 .html Got rid of "�", but other letters ar still "?"SORRY FOR THE SPAM. was not on purpouse x: "Ā" Link to comment Share on other sites More sharing options...
jeffman Posted September 16, 2010 Share Posted September 16, 2010 Are you still using the custom font? Have you tried the change using a normal font? Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 Are you still using the custom font? Have you tried the change using a normal font?I'm using Verdena (Same as this forum uses.) i copyed out that font from my windows folder, renamed to verdena 2, included it throught CSS - nothing changed, so ofcourse i'm not using that method since it doesn't work. And "Times New Roman" shows boxes and non speciffied font (default) shows "?" aswell. Link to comment Share on other sites More sharing options...
granGripau Posted September 16, 2010 Share Posted September 16, 2010 I had a similar problem with spanish: I set the character encoding to western european and it fixed the problem.i.e.:<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="lang" content="es"/>you can see the different encodings here:http://en.wikipedia.org/wiki/Character_encodingHope that helps Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 I had a similar problem with spanish: I set the character encoding to western european and it fixed the problem.i.e.:<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="lang" content="es"/>you can see the different encodings here:http://en.wikipedia.org/wiki/Character_encodingHope that helpsDidnt help at all. Maybe we can figure whats wrong with host? Cause i have used UTF-8 on my lacal test server and another host, and on bouth it worked just fine. But the host which im using now has issues with it. Link to comment Share on other sites More sharing options...
jeffman Posted September 16, 2010 Share Posted September 16, 2010 Can you provide a link we can test for ourselves? Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 Can you provide a link we can test for ourselves? http://darktemplar.kristaps.org/rtu/index.phpif this is what you ment with "link" Link to comment Share on other sites More sharing options...
granGripau Posted September 16, 2010 Share Posted September 16, 2010 Didnt help at all. Maybe we can figure whats wrong with host? Cause i have used UTF-8 on my lacal test server and another host, and on bouth it worked just fine. But the host which im using now has issues with it.Did you try:ISO 8859-16 ?If so, are you entering this text through a text box of a cms that you created?Or are you handcoding the html using the special characters name/numbercode?If your entering text into a text box or phpmyadmin, sometimes you still have to use the name/numbercodesdepending on how they're configured... Link to comment Share on other sites More sharing options...
kakaini Posted September 16, 2010 Author Share Posted September 16, 2010 Did you try:ISO 8859-16 ?If so, are you entering this text through a text box of a cms that you created?Or are you handcoding the html using the special characters name/numbercode?If your entering text into a text box or phpmyadmin, sometimes you still have to use the name/numbercodesdepending on how they're configured...Yes i tryed. From one file it takes letters correctly, in another file i had to use ###;, some letters (ā-ž, Ā-Ž) from MySQL it shows as ? (having .httaccess with code "AddCharset UTF-8 .php").If you think that the problem is in MySQL - added data with form, data in SQL throught phpmyadmin appears correctly, i tryed different table charsets, it's not like MySQL on HOST would differ from my local one. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.