View Full Version : Can you use the <a> element's charset attr to display the linked document...

02-13-2011, 05:42 PM
Can you use the <a> element's "charset" attr to display the linked document in another language (hypothetically)? I know currently no major browsers support this attribute of the anchor tag, but I'm writing a web coding program in which I will need to know info like this about the charset attr (i.e. what exactly its for, since the description of it is kind of vague on most websites I've visited), in case browsers start supporting it in the future.

02-14-2011, 04:53 AM
Ok, this is really annoying...
I finally found some info on the <a> element's "charset" attribute for IE in this Microsoft article (http://msdn.microsoft.com/en-us/library/ms533553(v=VS.85).aspx), which states in the "Remarks" that in IE 6, "the property now applies to the a, link, and script objects", so I assume the version of IE I'm coding for (IE 8.0) supports the charset attribute, and yet the only description that it provides is the following:

Gets or sets the character set used to encode the object.

Now that's as vague a description as they get. :(
I wrote a test.html file which I opened in IE that declares an <a> element with a "charset" attr, but when I click on the link, it definitely does not open the link with the character set of the linked document set to Japanese, and the charset attr doesn't appear to do anything.
The <a> element I wrote looks like this:

<a href="http://www.google.com" id="C_Google_link" class="C_Google_link" charset="ISO-2022-JP">Click this link to go to Google.com</a>

In addition, it says you have to "set" the value of this property before you can retrieve it, but it doesn't say how exactly to do that.

What a pain...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum