ASP.NET and diacritics - asp.net

I intend to create asp.net pages using Visual Studio 2008. Preferably, the pages should be fully compliant with XHTML standard. How should I include the diacritics into the page content (no need to use diacritics in URLs)? Should I use character references (the ones with "&"), or just writing them directly form the keyboard?
Thank you.

You will need to ensure the correct character set encoding for the page, UTF-8 usually covers most western alphabets and UTF-16 for double byte characters required by languages that use ideograms.
In the HEAD element of the page you will need some form of the following tag;
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
You will also need to ensure you have the correct DOCTYPE specified;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
This is well covered by the W3C Character Sets Tutorial

Related

twitter widget won't validate

I've read around that XHTML 4.01 does not has the data- attribute. Unfortunately my class calls for the use of XHTML. I need to embed a twitter widget and it works however the site won't validate.
a class="twitter-timeline" href="https://twitter.com/row2k" data-widget-id="654806159795183617">Tweets by #row2k</a>
Can anyone help assign the "data-widget-id" another way so that the widget will run as well as validate?
If you're not using any entity references such as (or if you can replace them all by numeric references like  ), you can use the <!DOCTYPE html> header and then it will work AND validate.
By the way, there is no such thing as XHTML 4.01; You meant XHTML 1.0 surely, the equivalent of HTML 4.01.

Website W3C validator shows "Mismatch between Public and System identifiers in the DOCTYPE declaration", what to do?

I'm trying to validate my website Hybrid.cz in the W3C validator. Unfortunately, it keeps showing the same errors because of the "Mismatch between Public and System identifiers in the DOCTYPE declaration". It says:
This document uses an inconsistent DOCTYPE declaration. The System
Identifier w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd declares the
XHTML 1.0 Transitional document type, but the associated Public
Identifier -//W3C//DTD XHTML+RDFa 1.0 Transitional//EN does not match
this document type.
The recommended Public Identifier for
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd is -//W3C//DTD XHTML 1.0
Transitional//EN.
My DOCTYPE is:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
I'm not really experienced in DOCTYPES. But I want to be able to use RDFa attributes within the site. What should I do?
You find a DTD which supports the mixture of XML languages you want to use, then you look up the correct Doctype for it.
Searching turns up the XHTML+RDFa 1.1 - Second Edition specification.
This shows the Doctype to be:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">

About solving Arabic language in ASP.NET

I create a website with Arabic display. I test it in my local PC. It works fine
Put when I uploaded it to company hosting.
the Arabic language appeared as Symbols. Not in default format
although the header contains supported Arabic language
so anyone help me what is the problem
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" XML: lang="ar-sa" lang="ar-sa" dir="ltr" >
<head>
<meta HTTP-equiv="content-type" content="text/html; charset=utf-8" />
Here is the answer, it is Arabic explanation
http://www.citystarit.com/Article_details.aspx?id=69
I have saved as only the master page, but it didn't work with me , then I have saved all As all other pages and it worked fine
Very possible that the hosting machine lacks the Arabic language, and thus will not render it properly.

W3C Validation - Wordpress DOC Type

i submitted the following site for validation, and received this error:
Website Link
Error:
No DOCTYPE found! Checking with default XHTML 1.0 Transitional Document Type.
No DOCTYPE Declaration could be found or recognized in this document. This generally means that the document is not declaring its Document Type at the top. It can also mean that the DOCTYPE declaration contains a spelling error, or that it is not using the correct syntax.
The document was checked using a default "fallback" Document Type Definition that closely resembles “XHTML 1.0 Transitional”.
I have tried changing the DOC type to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
however it still picks up the error?
Any advice would be greatly appreciated, thank you
I can't see a doc type at the top of your source code. I have added one and manually validated the code through the W3 checker and it passed without warning to related to the doc type.
This is the doc type I added
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

ASP.NET 404 Response Text Chinese-like

When loading a page containing references to non-existing URL's using tags, I see a strange text reply from the server.
The server does return status code 404 as expected, but it also includes a text response with chinese-like characters.
Is the server infected, or is the error message just in a different language than english ... ?
If infected, how can I find out where?
Here is an example of the text replies. It seems that the reply is identical for each 404 error, although a part of it changes when a different filetype is not found.
㰡䑏䍔奐䔠桴浬⁐啂䱉䌠∭⼯圳䌯⽄呄⁘䡔䵌‱⸰⁓瑲楣琯⽅丢•桴瑰㨯⽷睷⹷㌮潲术呒⽸桴浬ㄯ䑔䐯硨瑭氱⵳瑲楣琮摴搢㸍਼桴浬⁸浬湳㴢桴瑰㨯⽷睷⹷㌮潲术ㄹ㤹⽸桴浬∾ഊ㱨敡搾ഊ㱭整愠桴瑰ⵥ煵楶㴢䍯湴敮琭呹灥∠捯湴敮琽≴數琯桴浬㬠捨慲獥琽楳漭㠸㔹ⴱ∯㸍਼瑩瑬放㐰㐠ⴠ䙩汥爠摩牥捴潲礠湯琠景畮搮㰯瑩瑬放ഊ㱳瑹汥⁴祰攽≴數琯捳猢㸍਼ℭⴍ੢潤祻浡牧楮㨰㭦潮琭獩穥㨮㝥活景湴ⵦ慭楬示噥牤慮愬⁁物慬Ⱐ䡥汶整楣愬⁳慮猭獥物昻...
You have a character encoding issue. It is a ASCII file that is being interpretted as a 2byte character encoding and thus you are getting the strange characters.
To translate it I copied the text to notepad. Saved it as Unicode-Big Endian and then used a hex editor to strip the first two characters (that tell it that it is unicode). Opening it again gave me:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>404 - File or directory not found.</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;
You would need to look into things to see if it is declaring the wrong content type in an HTML header (the content type in the meta tag looks correct) or something else is causing it problems.

Resources