special characters in HTML problems - html

Although I included the ISO-8859-1 content-type META, my website isn't displaying special characters, such as ã and ê. If I 'echo' a string from a MYSQL query, the special character is displaying properly. If I write the SAME character in plain HTML, it won't display in the same website.
Thanks in advance.
http://popguest.com.br/event/index3.php?c=48&p=3

Maybe you could use a simple routine to encode all special characters to entities (&#x----; with correct hexadecimal unicode number after x)
(and switching to UTF-8 is not a bad idea)

Related

I get the wrong character, even using HTML encoding

On a website I use the futura font. I use some french language text, so I need the "à" character, amongst others. I use UTF-8 charset.
Weirdly, the "à" shows up as an r with an accent on top (see the pic)
i tried HTML encoding
à
But the result is the same. Is there something I can do about it?
There is rather insufficient information in the question, but the probable explanation is that the HTML document is not in the UTF-8 encoding but in the ISO-8859-1 and the browser is interpreting it as ISO-8859-2 encoded. The letter “à” has the code E0 (hexadecimal) in ISO-8859-1; in ISO-8859-2, this code denotes the letter “ŕ”.
How to fix this? It depends on how the problem was created, especially how the character encoding is declared (or guessed by browsers). See
https://www.w3.org/International/questions/qa-html-encoding-declarations .

HTML special characters for languages

Is there any way to type this word "हिन्दी中文(简体)" in html?
I see that there's codes for special characters in html for example for "العربية" العبية
But I can't find these codes for this "हिन्दी中文(简体)"
There are tools out there that can do this conversion from raw Unicode symbols to encoded HTML entities.
हिन्दी中文(简体)
Yes, you can write “हिन्दी中文(简体)” as “हिन्दी中文(简体)” in HTML. Naturally, you need a character encoding that lets you do that, primarily UTF-8, but that’s a good idea anyway.
You can write any character using a character reference like ह (for U+0939 DEVANAGARI LETTER HA, “ह”), but this increases the data size and makes the HTML code look very obscure.

Is there a need to use HTML entities when using Unicode?

I am building a website for a German client, so the text on the website will regularly contain characters like:
ä
ö
ü
ß
Is it necessary for to convert all those characters to their HTML Entities while the website uses UTF-8 character encoding everywhere?
Or maybe there's no relation between the two areas?
When (if at all) should I convert those to their HTML Entities, then?
You should convert to HTML entity or character references when:
a. you are stuck with some editor or processing component that doesn't support Unicode properly;
b. you have manually-edited markup with confusable characters. For example, if you have a non-breaking-space that is important to lay out correctly, you might want to write it as or   so that it's obvious and doesn't get replaced with a normal space when someone edits the file.
Other than that, no, just go with the raw versions.

Ascii characters more reliable in html?

Im making a webpage. In the html is it better to use ascii characters? The following look the same for me when I test in different browsers but is the first one better practice?
Opening -
Opening -
It's ok to use literals like - over escaped &#45 entities, and it is also encouraged for readability. Only characters you have to escape are the so called "unsafe entities" (like < and > are, as they can mark a new tag and therefore are ambigous to the browser.
If you declare the document encoding as UTF-8, then you can insert any character (also non ASCII, like letters from foreign alphabets or accented letters) which will not violate markup syntax.
Only reason to keep &... characters is compatibility with ancient browser not recognizing UTF-8.

Basic Punctuation Symbol Errors

I'm receiving data from my database, and I'm showing it through echo statements, but for some reason all the basic punctuation eg (',") are all returning small diamonds with Questionmarks inside of them, can someone tell me what is wrong?
It sounds like you may need to escape some of those special characters. Here is a list of escape codes that you can use:
Escape Character Codes
If using these codes doesn't work, make sure that the actual document encoding matches the UTF-8 encoding specified. This can be examined in a text editor like Notepad++.