compositor Posted December 15, 2009 Share Posted December 15, 2009 Is it possible, or am I chasing the wrong tail? Link to comment Share on other sites More sharing options...
boen_robot Posted December 15, 2009 Share Posted December 15, 2009 Is what possible about entities in JavaScript and HTML DOM?Entities are part of the HTML layer, so you can safely write var string = "This & that"; As far as writing entities in JavaScript sensetive places, I'm not entirely sure about the story... nor am I sure if it's the same on all browsers. i.e. if (this > that) may work (and is actually guaranteed to work in XHTML served as application/xhtml+xml), but that's not to be taken for granted. If you want to be on the safe side, write all of your JavaScript in an external file. Link to comment Share on other sites More sharing options...
compositor Posted December 18, 2009 Author Share Posted December 18, 2009 Is what possible about entities in JavaScript and HTML DOM?Entities are part of the HTML layer, so you can safely writevar string "This & that"; As far as writing entities in JavaScript sensetive places, I'm not entirely sure about the story... nor am I sure if it's the same on all browsers. i.e. if (this > that) may work (and is actually guaranteed to work in XHTML served as application/xhtml+xml), but that's not to be taken for granted. If you want to be on the safe side, write all of your JavaScript in an external file. Hi Boen,I looked into it, and actually you need to use programming contructs, eg C and Java. I was wondering since w3 schools have no information on this maybe i should post a link, since using hex references is the only way.Thank you Link to comment Share on other sites More sharing options...
Synook Posted December 18, 2009 Share Posted December 18, 2009 Err, a "programming construct" is any feature of a programming language, e.g. conditionals, arithmetic, looping.An "entity" (as we understand it) is a character sequence in HTML, beginning with an ampersand, that represent some other character, e.g. .A "hex reference" is either an assembly opcode, or more relevant to web design, a hexadecimal representation of a color in the RGB color space.In other words, I don't think we understand what you are asking. Link to comment Share on other sites More sharing options...
compositor Posted December 18, 2009 Author Share Posted December 18, 2009 Err, a "programming construct" is any feature of a programming language, e.g. conditionals, arithmetic, looping.An "entity" (as we understand it) is a character sequence in HTML, beginning with an ampersand, that represent some other character, e.g. .A "hex reference" is either an assembly opcode, or more relevant to web design, a hexadecimal representation of a color in the RGB color space.In other words, I don't think we understand what you are asking.This is what I found:http://www.fileformat.info/info/unicode/char/feff/index.htmYou can use the C/C++/Java source code reference.Does anyone know if it's on the w3schools website?Thank you Link to comment Share on other sites More sharing options...
justsomeguy Posted December 18, 2009 Share Posted December 18, 2009 What exactly are you trying to do? Are you trying to represent a Unicode character in the HTML DOM? I'm not even really sure what that means.. if you're using Javascript or HTML and you want to represent a unicode character, you can use either entity code listed on that page (either decimal or hex). Is that what you're trying to do? What's your question? Link to comment Share on other sites More sharing options...
Synook Posted December 19, 2009 Share Posted December 19, 2009 That link doesn't load for me, but unless you are trying to display supplementary characters (Unicode codepoints that require 21 bits) a HTML entity will suffice. Link to comment Share on other sites More sharing options...
compositor Posted December 19, 2009 Author Share Posted December 19, 2009 That link doesn't load for me, but unless you are trying to display supplementary characters (Unicode codepoints that require 21 bits) a HTML entity will suffice.Hi,As far as I know Unicode entities in DOM aren't replaced with their representation but are rather left "as is" and the only way to represent a character in a codified fashion is by using programming entities instead, this makes sense as you cannot use classes either.By DOM I mean using programmatic means to render a webpage, eg via javascript.Anyway, that link should work if you copy and paste manually.Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.