View Full Version : URLīs special codes
02-09-2004, 03:06 PM
Hello dudes, someone here knows where can i find all URLīs special caracteres? Like %20 ( that means space ), i want to know which code is \n.
02-09-2004, 03:17 PM
\n represents the notion of a newline, that is LF, CRLF, CR or NEL depending on the operative system. LF if 0a, CR is 0d.
02-09-2004, 03:23 PM
02-09-2004, 06:39 PM
I found a site that explain how to convert \n, \t and other caracter to URL encoder, we can use String.charCodeAt( ) to convert those caracters, mainly its a conversion in hex of ascii caracterīs value. For example: Space hex => 20. But just now i know that.
02-10-2004, 04:32 AM
As Alien51 pointed out. You can just escape the special character to get the encoded value;
var chars = '! ~@!#%^$&)(*_-_|+<>=\t\r\n';
var arr = chars.split('');
var str = '';
for (var i=0;i<arr.length;i++) str+=arr[i] + ' --> ' + escape(arr[i]) + '\n';
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.