Why am I getting †character in plain HTML? - html

I have bound data to a repeater control in ab asp.net application. When the data is displayed in plain HTML text in the browser it comes with these characters: â€. I am unable to figure out the reason behind this.

What kind of html document type are you writing right now. If it's HTML 5, then check if you have <meta charset=utf8 /> under the <head> tag. If you are using <meta http-equiv="Content-Type" content="text/html; charset=utf8" /> under your <head> tag.

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
have you given this in your code?
http://ask-leo.com/why_do_i_get_odd_characters_instead_of_quotes_in_my_documents.html

Also look at the tables in the database to see what collation they are eg latin1_swedish_ci, utf8_general_ci

Use symbol " . Do not use ”
Correct example:
mozilla.com
Incorrect:
<a href=”http://www.mozilla.com”>mozilla.com</a>

Related

Arabic language not displaying in Notepad

peace upon you
I have a problem with the language when I was in the notepad
An idea about the subject
I tried to put metadata utf-8
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
It doesn't show the arabic words, it shows question marks instead
Include the two tags inside your paragraph marker:
dir="rtl"
lang="ar"
رَبٍّ زِدْنٍي عِلمًا
<p dir="rtl" lang="ar" style="color:#e0e0e0;font-size:20px;">رَبٍّ زِدْنٍي عِلمًا</p>
Here the meta tag you can use if you are using notepad.
**<meta content="text/html; charset=utf-8" http-equiv=Content-Type>**
if you are using modern text editor like sublime you don't need to put that.

HTML how to get it to display čšž on your site

Trying to learn to make a site. And right from the start:
How do I get HTML to display ščž and other various special characters like ł,ß,ö..?
You need to specify a character set so the browser knows what's being used in the page. For example, in your head section, try putting:-
<meta charset="UTF-8">
You can also try specifying symbols using their entity name/code, using the character reference table here - https://dev.w3.org/html5/html-author/charref
Here's an HTML5 example. meta declares the encoding of the HTML file. Make sure to save the file in that encoding!
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Example</title>
</head>
<body>How do I get HTML to display ščž and other various special characters like ł,ß,ö,&#x9A6C..?</body>
</html>
You can enter any character you know the Unicode codepoint using &#xnnnn syntax. In the example above, U+9A6C is the Chinese character for horse(马).

character encoding in a html page

I have 2 html pages (index.html and game.html) where I specify the same character encoding UTF-8
in the first page (index.html) every thing works fine but in the second page all characters appear like this �
this is the code of 2 pages :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> أصوات</title>
</head>
<body dir="rtl" lang='ar' class="contentBack">
</body>
</html>
the result in my browser:
how can I solve this problem ?
Make sure the file is also saved with the corresponding encoding (in your case UTF8). Setting the right meta charset may not be enough.

Turkish characters does not display correctly

i have the following code. it contain Turkish content. but i get the results including special charecter. so please give solution for that.
html code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<META HTTP-EQUIV="content-language" CONTENT="TR" />
<title>test</title>
</head>
<body>
Tarihçe
</body>
</html>
i will get Tarih�e instaed of Tarihçe.
If you can use Turkish encoding below will be the meta tag
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
else code Tarihçe as
Tarihçe
Change the actual character encoding of the file to UTF-8, using whatever settings need to be used in the program you use to create and edit pages. The file is now in some 8-bit encoding, so the letter ç appears in the data as a byte that is not allowed in UTF-8; hence the � symbol (it indicates character-level data error).

HTML5 page language, direction and encoding

What is the correct way of declaring a HTML5 page to be in Hebrew, RTL and utf-8 encoded? I haven't done it in a while, but I remember that in HTML4 it involved 3 or 4 tags and attributes that seemed redundant. Is it still the same?
<html dir="rtl" lang="he">
<head>
<meta charset="utf-8">
...
</head>
...
</html>
You need the following:
A <!doctype html> to indicate your page is HTML5.
An <HTML> tag with the following attributes:
dir="rtl"
lang="he"
Note: you may omit the ", or use ' instead.
A <meta> tag to declare the character encoding. You can choose one of the following:
<meta charset="UTF-8">
Note: you may omit the ", or use ' instead.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
This is the "legacy" way of declaring character encoding. It's still allowed within HTML5, but all modern browsers support the first variant so there is no need for this.
Note: you may omit the " for the http-equiv attribute, or use ' instead for all attributes.
If the browser encounters an UTF-8 byte order mark, it will treat an HTML5 file as UTF-8. This happens regardless of any character encoding declared using meta tags.
None of the tags, attributes and attribute values used here, or the DOCTYPE, are case sensitive.
Note: if the browser encounters a character encoding declaration, it will re-parse the document from the start using the specified encoding. You can put your encoding inside a Content-Type HTTP header so this won't be a problem.
Note also that the browser will only look for a character encoding declaration in the first 1024 bytes of a document.
You need these to create a HTML5 page with language as hebrew, direction as RTL, and utf-8 encoded
<!DOCTYPE html> For declaring it as a HTML5 page
<html dir="rtl" lang="he"> For direction and language
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> For utf-8
<html dir="rtl" lang="he">
not: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Does not work on "Chrome" and "Firefox" browsers.