charset=utf-8 - but it cannot display "ü" - html

I declared the charset like all current HTML5 websites, but now German letters cannot be displayed anymore. If I leave the declaration out it works again. I think one should have that declaration. What is wrong?
HTML
<!DOCTYPE html>
<html lang="de">
<head>
<meta http-equiv="content-type" content="text/html,charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>äää</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
üüü ääää öööö
</body>
</html>

I believe that the charset parameter needs to be separated from the MIME type by a semicolon, not a comma. See the W3 docs.
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

you have insert , instead of ; between charset and text/html
try this:
<meta http-equiv="content-type" content="text/html; charset=utf-8">

Check that your html file is saved in UTF-8 and if you use HTML5 declaration your meta can look like:
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
.
.
.
</head>

Related

black diamond question marks- Rmarkdown

I have two rmarkdown generate html reports.
The first one (rmarkdown version 1.10, pandoc version 2.7.1)with R is working fine
The second one (rmarkdown version 2.2, pandoc version 2.7.1) had black diamond with questions marks show up in places with html characters.
I compared the two documents, and it seems that the only differences are in the headings of the html document.
In the first document, the heading is as following
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
In the second document, the heading is as following
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
I am opening both with Chrome. Can someone help explain why this might be happending?
Thank you!

On the web page, place a link to the txt file and specify the encoding of the file as utf-8

Now the code is:
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<span lang="en-us">txt - </span>
How to insert charset="utf-8" attribute?
You should declare the whole document as UTF-8 with a charset command.
Add this between <head> and </head>:
<meta charset="utf-8"/>

og:title, description and image

i'm currently going a thumbnails generator for my site and maybe other people can use it so what this does is to generate a html file and that file get instant uploaded to the webhost so the file looks like the following code but the issue that facebook saying they didn't detect the og: title and description and image ... weird maybe i'm doing something wrong or the code is wrong ?
Just to note i use the facebook debug to scrape it and check : https://developers.facebook.com/tools/debug/sharing/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="fb:admins" content="John.Evenetcha"/>
<meta property="fb:app_id" content="2217370698541973"/>
<meta property="og:locale" content="ar_AR">
<title> تيار المحبة </title>
<meta name="description" content="القيادي بحزب تيار المحبة حسام الهمادي ينفي اشاعة التحالف مع نداء تونس ويصفها">
<meta name="Keywords" content="Tayar Al Mahaba" />
<meta property="article:author" content="https://www.facebook.com/John.Evenetcha" />
<meta property="article:publisher" content="https://www.facebook.com/John.Evenetcha" />
<meta property="og:type" content="article" />
<meta property="og:title" content="تيار المحبة"/>
<meta property="og:image" content="https://scontent.ftun2-1.fna.fbcdn.net/v/t1.0-9/44410830_2120345971363361_6384115955156385792_n.jpg?_nc_cat=111&_nc_ht=scontent.ftun2-1.fna&oh=246eea65cc7fddd40108f6bd8f840876&oe=5C52445D"/>
<meta property="og:site_name" content="تيار المحبة"/>
<meta property="og:description" content="القيادي بحزب تيار المحبة حسام الهمادي ينفي اشاعة التحالف مع نداء تونس ويصفها"/>
<meta http-equiv="REFRESH" content="0;url=https://tayar-al-mahaba.cf/TAM/news/view/9">
<BODY>
Redirecting...
</BODY>
</head>
</html>
Solved the issue! the problem was that i generate it using VB.NET and got System.Text.Encoding.Unicode in the rewrite method i though that will make it good :D

Language accents displaying as ??? on my website

Currently I am trying to display Korean Language characters on my website but instead it's displaying text which looks like ??? where the Korean language should be.
You can seen an example in the screen shot below.
I have tried to add the following to my meta and no luck.
<meta http-equiv="content-language" content="ko"/>
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml">
Here's the current structure of my head content.
<!DOCTYPE html>
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta charset="UTF-8" >
<!-- <meta http-equiv="content-language" content="ko"/> === commented out as it didn't do anything.-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<meta property="og:image" content="" />
<meta property="og:url" content="" />
<meta property="og:title" content="" />
<meta property="og:type" content="website" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
EDIT: I have viewed some of the following questions and they did NOT help solve my issue. Question 1 & Question 2.
The meta tag
<meta http-equiv="content-language" content="ko"/>
is not declaring the encoding of the text. It is only a clue to search engines that your page is in the language specified. The lang attribute has the same effect.
You should use the charset attribute:
<meta charset="UTF-8">

How can I set charset in HTML? [duplicate]

This question already has answers here:
UTF-8 all the way through
(13 answers)
Closed 6 years ago.
I'm having a trouble with a site. I set the charset to Unicode, but it still won't work. Here there is sample code of how I set it:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
http://www.w3.org/TR/html4/loose.dtd>
<html lang="it">
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="iso-8859-1">
<title>HOME</title>
</head>
<body>
<h1> This are some accented letters and various symbol</h1>
<p>è é ç ò ù § ▼ à </p>
</body>
</html>
[1]: https://i.stack.imgur.com/csRk2.jpg
Add the following line within the head tag and remove your charset:
<meta charset="UTF-8">
Or replace
<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="iso-8859-1">
with
<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="utf-8">
For more information, check HTML <meta> charset Attribute