Akira Posted September 29, 2008 Share Posted September 29, 2008 Ok, should be a stupid thing i'm missing but guys, please help. Working on a german site, which have loads of special chars like for example; ü. Now, I know, by inserting that kinda text in a DB with htmlentities() function, that fixes the problem. But now, in a language file, I have this: $LANG_SITE['link']['text']='<img src="/d4/_img/icon_link.gif"> Link zur offiziellen Website des Büros der'; When i echo or print this array, the Büros part displays like: B?er Using htmlentities() doens't work, cause it mixes up the html code. What is a other work arround? Thanks in advance for any responds! Quote Link to comment https://forums.phpfreaks.com/topic/126328-special-characters-problem/ Share on other sites More sharing options...
sKunKbad Posted September 29, 2008 Share Posted September 29, 2008 You might check that you are declaring the character set in the head section of the page, and that there isn't a charset being output by php itself. Quote Link to comment https://forums.phpfreaks.com/topic/126328-special-characters-problem/#findComment-653273 Share on other sites More sharing options...
Akira Posted September 29, 2008 Author Share Posted September 29, 2008 Oh My **** dude, thanks, this was the stupid thing i was talking about lol By just deleting <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> in the header fixed the entire problem... your my hero dude! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/126328-special-characters-problem/#findComment-653296 Share on other sites More sharing options...
DarkWater Posted September 29, 2008 Share Posted September 29, 2008 You WANT utf-8. You need to make sure you're sending UTF-8 headers (if you're sending any), and make sure that database it set to use utf-8. It'll work if your entire coding structure is set to UTF-8. Quote Link to comment https://forums.phpfreaks.com/topic/126328-special-characters-problem/#findComment-653305 Share on other sites More sharing options...
Akira Posted September 29, 2008 Author Share Posted September 29, 2008 thanks for your repley! I created my DB in utf-8 But don't see what it shouldn't work with <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> cause everything what i know of is set to it. Quote Link to comment https://forums.phpfreaks.com/topic/126328-special-characters-problem/#findComment-653335 Share on other sites More sharing options...
DarkWater Posted September 29, 2008 Share Posted September 29, 2008 Are you sure that the page that has to form to input into the database is using utf-8? Quote Link to comment https://forums.phpfreaks.com/topic/126328-special-characters-problem/#findComment-653340 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.