OnPage Issues with UTF-8 and ISO-8859-1
-
Hi guys,
I hope somebody can help me figure this out. On one of my sites I set the charset to UTF-8 in the content-type meta-tag. The file itself is also UTF-8. If I type german special chars like ä, ö, ß and the like they get displayed as a tilted square with a questionmark inside.
If I change the charset to iso-8859-1 they are getting displayed properly in the browser but services like twitter are still having the issues and stop "importing" content once they reach one of those specialchars.
I would like to avoid having to htmlencode all on-page content, so my preference would be using UTF-8..
You can see it in action when you visit this URL for example: http://www.skgbickenbach.de/aktive/1b/artikel/40-minuten-fußball-reichen-nicht_1045?charset=utf-8
Remove the ?charset parameter and the charset it set to iso-8859-1.
Hope somebody has an answer or can push me into the right direction.
Thanks in advance and have a great day all.
Jan
-
Hi Jan,
I'm following up on old questions. Did Theo's answer solve your problem for you?
-
Wow good answer!
-
Getting a web page to display your content as TRUE utf-8 requires everything to be set at the utf-8 encoding. 'Everything' includes: your database, your database tables, your database fields, your connection from php to your database, you header as set by php, your header as set by html, your content itself etc.
The following resources were extremely helpful to me when I was switching to utf-8 (which is by far the better encoding over ISO):
http://www.phpwact.org/php/i18n/utf-8
http://www.phpwact.org/php/i18n/utf-8/mysql
Bonus tip: make sure your content and files are saved as utf-8 without BOM (Byte Order Mark), this will save you lots of trouble later!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Href lang issues - help needed!
Hi, I have an issue with Google indexing the US version of our website rather than the UK version on Google.co.uk. I have added hreflang tags to both sites (https://www.pacapod.com/ and https://us.pacapod.com/), have updated and submitted an XML sitemap for each website and checked that the country targeting in search console is set-up correctly but Google are still indexing the wrong website. I would be grateful for any assistance with this issue. Many thanks Eddie
Technical SEO | | mypetgiftbox0 -
Google is Still Blocking Pages Unblocked 1 Month ago in Robots
I manage a large site over 200K indexed pages. We recently added a new vertical to the site that was 20K pages. We initially blocked the pages using Robots.txt while we were developing/testing. We unblocked the pages 1 month ago. The pages are still not indexed at this point. 1 page will show up in the index with an omitted results link. Upon clicking the link you can see the remaining un-indexed pages. Looking for some suggestions. Thanks.
Technical SEO | | Tyler1230 -
301 issue in IE9
My development team recently discovered an issue with 301 redirects caching in IE9. They did some research and found the situation was very complicated so their solution was to use 302s and no longer use 301s. As a temporary solution to a few URLs I was okay with this, but we have a site redesign launching in a few months and I am quite worried if we have to do all of our redirects as 302s. Has anyone else had this issue with IE9 and 301s. I could use any advice on how to overcome this issue. Thanks!
Technical SEO | | SEI0 -
Site not ranking in Google but comes up #1 in Yahoo and Bing
Hi everyone, I've been working on SEO for this site for about 2 years and for some reason the site has just tanked in google. However it shows up #1 in yahoo and bing for the same search. http://www.nfsmn.com Phrase: "commercial foundation repair mn" If anyone can shed some light on the issue I would really appreciate it. They do have a sister-site: american-waterworks.com that may be causing issues as they link a lot of content to amww but not the other way around. Thanks Eric
Technical SEO | | reynoldsdesign0 -
NEED HELP ASAP: SERVER ISSUE
Hey guys, Some of you may be aware of our story. We have a website about or son who was born with Down syndrome. Two days a go a post I wrote went sort of viral, and I woke up this morning to an email from my host saying they had to take my site down as an emergency because of the amount of resources it is using. So now my site is down (noahsdad.com.) ...any ideas how to proceeded? I really need to get my site back online asap. Thank you.
Technical SEO | | NoahsDad0 -
Ranked on Page 1, now between page 40-50... Please help!
My site, http://goo.gl/h0igI was ranking on page one for many of our biggest keywords. All of a sudden, we completely fell off. I believe I'm down somewhere between page 40-50. I have no warning or error messages in webmaster tools. Can anyone please help me identify what the problem is? This is completely unexpected and I don't know how to fix it... Thanks in advance
Technical SEO | | Prime850 -
Rel = author display issue
I want to enter some products as blog posts. I don't want users to see the post info, but do want SE's to see rel="author". I can do this by setting display to "none" in a CSS style. The post info does not appear in the browser but is still in the page source. Will search engines be able to see the post info?
Technical SEO | | waynekolenchuk0 -
How to Fix Duplicate Content Issue of Manufacturer Details Paragraph?
I am surviving with Google's crawling issue. Google had not index my product pages yet. I have Google a lot and read too many articles to get it done. But, I did not get satisfy answer with it. I just checked my product pages and found that: There is one tab with Manufacturers Details containing one paragraph. This content is available on too many product pages with same manufacturer. You can know more by visiting following URL. http://www.vistastores.com/indoorlighting-elklighting-d1472.html So, Does it matter to stop my crawling? If yes so How can I fix it?
Technical SEO | | CommercePundit0