Language on page is not showing up - html

I am trying to create a page which displays the content in a different language how ever the content is displaying as only ??????? on the page.
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar">
<head>
<title>Arabic Quran</title>
<meta name="Author" content="Mustafaa Hanafi"/>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Content-language" content="AR"/>
<meta name="Keywords" content="hadith bukhari, sahih Bukhari, the hadith of the prophet, ahadith, ahadees, hadees, hadist, saheeh bukhari, hadist bukhari, the hadith, bukhari hadith"/>
<meta name="Description" content="Sahih bukhari hadith narrations and translation in english, it is one the most authentic collection of hadith, view the hadith by narrator or search"/>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
I included this in the meta tag and if my reading on this tag is correct it should make it display the content in Arabic. I will provide a screenshot with my issue below.

for the page Arabic vision of Quran add lang="ar" to the html tag like so
<html lang="ar">
...
</html>
or try this when first connect to your data base : SET CHARACTER SET utf8
$MySQL_Handle = mysqli_connect(HOSTNAME,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME)
or die ( mysqli_error($MySQL_Handle) );
$sSQL= 'SET CHARACTER SET utf8';
mysqli_query($MySQL_Handle,$sSQL)
or die ('Can\'t charset in DataBase');

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"/>

What is the proper declaration in HTML head?

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=width-divice, initial-scale=1.0">
<link rel="icon" href="images/icon/icon.png">
<title>T#O</title>
<link rel="stylesheet" href="style/style.css">
</head>
</html>
I ask if there is a lacking code that need to put
You can use this meta tags for SEO if you want
<meta name="keywords" content="wood, furniture, garden, gardentable, etc">
<meta name="description" content="Official dealer of wooden garden furniture.">
This meta tags tells search engines not to index the page and prevent them from following the links. If you happen to be using two contradictory terms (e.g. noindex and index), Google will choose the most restrictive option.
<meta name=”robots” content=”noindex, nofollow” />
Why is this tag useful for SEO? First of all it’s a simple way to prevent the indexation of duplicate content, for example the print version of a page. It might also be useful for incomplete pages or pages with confidential information.
Also i sometimes use
<meta name="author" content="John Smith">
You have a typo in your viewport declaration - it needs to be "device-width". Other than that, your head declaration includes all the necessary parts and looks valid to me.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="images/icon/icon.png">
<title>T#O</title>
<link rel="stylesheet" href="style/style.css">
</head>
</html>

how can i display a "é" using <h2>

I want to display a special caracter but when i used <h2></h2> this caracter does not appear on the web-site page.
<h2>Aéroport Tunis Carthage </h2>
on the web-site the text is: Arport Tunis Carthage.
<h2>Aéroport Tunis Carthage</h2> will do it.
Handy info on encoding can be found here and info on html character entities here.
There are two ways for displaying special characters in HTML:
1) Using HTML entities. For example:
Aéroport
2) Encoding the source HTML file appropriately (e.g. using UTF-8) and then indicating such encoding in the HTML head:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h2>Aéroport Tunis Carthage </h2>
</body>
</html>
Of course, you have to use a text editor capable of writing files in the desired encoding. Otherwise you should indicate in the <head> the encoding used by the editor.
Try adding this to your meta tags:
HTML4:
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
HTML5:
<meta charset="UTF-8">
Source:
http://www.w3schools.com/tags/att_meta_http_equiv.asp
EXAMPLE:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta Tag -->
<meta charset="UTF-8"> <!-- HTML5 -->
<title> Your title here </title>
</head>

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

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>