Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue]>>> s='tek-?????? forums'[/blue]
[red]"tek-?????? forums"[/red]
[blue]>>> s.length[/blue]
[COLOR=#008]17[/color]
[blue]>>> escape(s.replace(/%/g,'.')).replace(/%u..../g,'..').replace(/%../g,'.').length[/blue]
[COLOR=#008]23[/color]
[blue]>>> s='tek-?????? forums'[/blue]
[red]"tek-?????? forums"[/red]
[COLOR=gray #eee]// the escape() function URLEncodes the String; this means for characters other than allowed [sup](*)[/sup] are replaced with percent sign ( % ) and their hexadecimal code[/color]
[blue]>>> escape(s)[/blue]
[red]"tek-%u0441%u043E%u0432%u0435%u0442%u044B%20forums"[/red]
[COLOR=gray #eee]// Unicode characters are represented as "%u...." where the 4 dots represents the 4 hexadecimal digits of the 2 byte character code; so we replace all those with 2 regular characters for easier counting[/color]
[blue]>>> escape(s).replace(/%u..../g,'..')[/blue]
[red]"tek-............%20forums"[/red]
[COLOR=gray #eee]// normal but not allowed characters are represented as "%.." where the 2 dots represents the 2 hexadecimal digits of the 1 byte character code; so we replace all those with 1 regular character for easier counting[/color]
[blue]>>> escape(s).replace(/%u..../g,'..').replace(/%../g,'.')[/blue]
[red]"tek-.............forums"[/red]