H5&CSS Basic —— 008. H5 Special Characters
»
001. Free HTTPS Certificate
002. About The Column
003. Visible Area of Browser
004. Why ReactJs
005. Prohibit mobile scaling
006. EM in H5
007. Space width in page
008. H5 Special Characters
009. H5 Restricting Input
010. H5 Font
011. nginx redirection configuration
012. Text Indentation
013. Flex Layout
014. Gradient Borders
015. Common DOM Operations
016. Media Query
017. CSS Selectors
018. CSS alternate lines color
019. fetch
020. JS Attributes Operation
021. scroll div
022. JS for Loop
023. Prohibit Text Selection
024. Precision Controled Float Output
025. Ionic Full Screen
026. SVG Circle
027. SVG Ellipse
028. SVG Arc
029. SVG Elliptical Sector
030. Using WebAssembly
031. JS Checklist checkbox Operation
032. SVG Bezier Curve
033. Threejs Material
034. Luminous Image Styles
035. Web Animation Points
036. CSS Gradient Fonts
037. SVG Rectangle
038. Development Ability for Remuneration
039. Close Browser Default Style for Input
040. Jet Tail Particle Animation
041. Prohibit Desktop Browser Scaling JS
042. Desktop Full Screen Web CSS
043. Display images in self scaling aspect ratio div
044. Bi-side Text Alignment Styles
045. Single line ellipsis
046. Multi-line ellipsis
047. Font Transformation Styles
048. Remove default style of a tag
049. Chinese Characters: Full Width Space
050. DIV lays on DIV
051. Calculating 1rem Pixel Values in JS
052. JS Operations of DOM Parent Nodes and Adjacent Nodes
053. Absolute Coordinates of DOM Elements in JS
054. ToolTips Div
055. Height and Width in JS
056. Nginx configuration for stream media
057. Scroll Bar Style
058. Common Methods for JS Array Operations
059. SVG Fill Style Definition
060. SVG Stroke Style Definition
061. SVG Drawing Lines
062. CSS Background Images Splicing
063. WebSocket
064. JS Calculate DPI
065. GIF Opacity or not
066. Nginx solved CORS problem
067. Look At JsonP before publish
068. Center and Middle Content in Div
069. CSS background image size keeping ratio
070. CSS Frame Animation
071. CSS Same Width Font Display
072. Package
    HTML must use special symbols
    
    English spaces( ):    
    And symbol(&): & &
    Less than sign(<): &lt; &#60;
    Greater than sign(>): &gt; &#62;
    Half width double quotation marks("): &quot; &#34;
    Half width single quotation mark ('): &lsquo; &#39;
    
    &#00000; is a decimal representation ofUCS-2 encodingcharacters,&#x0000; is a hexadecimal representation ofUCS-2 encodedcharacters. UCS-2 encodingcharacter compatibilityASCII code, is a subset ofUTF-16.
    
    Required special symbols in JS
    Half width double quotation mark ("): \ u0022
    Half width single quotation mark ('): \ u0027
    \u represents UCS-2 in hexadecimal in JS
    
    Required special symbols in CSS
    Half width double quotation mark ("): \ 0022
    Half width single quotation mark ('): \ 0027
    \ represents UCS-2 in hexadecimal in CSS
    
    With the code representation of these special symbols, HTML pages can represent any content.
    
    In JavaScript and CSS, characters are encoded using the UCS-2 encoding scheme, which is actually a subset of UTF-16 instead of the complete UTF-16 encoding scheme. Characters that cannot be represented by two bytes, JavaScript represents through proxy pairs, which means that two UCS-2 characters combined represent one character. This character encoding method is the UCS-2+surrogate pair encoding method. The proxy character surrogate starts with& #xD800.
    
    In JavaScript, proxy character pairs are treated as two characters, and often cause the result incorrect..
    
    And ES6 treats proxy character pairs as a single character. So, ES6 can accurately process any character.
    
    For example, the processing of extended characters in native JS is as follows:
    "bytes:💩".split("")
    The result is:
    
    
    The ES6 method for processing extended characters is (ES6 syntax, expanded into an array):
    [..."bytes:💩"]
    The result is:
    
    
    Namely: Native JS handles proxy character pairs as two characters; ES6 processes proxy character pairs as a single character.
    So, the search and splitting of special characters or strings in JS is quite special, and it is necessary to consider the handling method of 4-byte characters.
    
    For example, the following processing method is incorrect:
    "bytes:💩".substring(0,7)
    The result is:
    
    
    The correct method is:
    [..."bytes:💩"].splice(0,7).join("");
    The result is:
    
    
    So, ES6 has also extended regular expressions by adding the u symbol. When recognizing 4-byte text after D800, ES6 treats the 4-byte text as a single character to match ES6.
    The correct way to add a JS or ES6 to handle international extended character set surnames:
    var surname=[..."💩No"][0];
    The result is:
    
    
    -- www.v-signon-com Learner Encouragement
    
«
--Alex.Zhang
--www.v-signon.com Learningers Co-Encouraged
Back
Personal Art: www.up-task.com Unit: Individual
中文 Русский 京ICP备19038994号-2
If the content on this website infringes upon your any rights, please contact me at 1307776259@qq.com for removal