Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q977 What is the hexidecimal Latin-1 encoding value for the backslash character (\)?

irt.org | Knowledge Base | JavaScript | Text | Q977 [ previous next ]

Q977 What is the hexidecimal Latin-1 encoding value for the backslash character (\)?

It is:

%5C

Which you can find out using:

<script language="JavaScript"><!--
alert(escape('\\'));
//--></script>

Because \ is the escape key, i.e. it can be used to escape other characters, e.g.:

alert('I haven\'t a clue')

then in JavaScript you have to escape it with itself.

The other escape sequences available:

\b backspace
\f form feed
\n newline
\r carriage return
\t tab
\' single qoute
\" double quote
\000 - \377 octal latin-1 character
\x00 - \xFF hexidecimal latin-1 character
\u0000 - \uFFFF hexidecimal unicode character

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.