How to get Uri.EscapeDataString to comply with RFC 3986

Having not been able to get Uri.EscapeDataString to take on RFC 3986 behavior, I wrote my own RFC 3986 compliant escaping method. It leverages Uri.EscapeDataString, and then ‘upgrades’ the escaping to RFC 3986 compliance. /// <summary> /// The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. /// … Read more

How to remove backslash escaping from a javascript var?

You can replace a backslash followed by a quote with just a quote via a regular expression and the String#replace function: var x = “<div class=\\\”abcdef\\\”>”; x = x.replace(/\\”/g, ‘”‘); document.body.appendChild( document.createTextNode(“After: ” + x) ); Note that the regex just looks for one backslash; there are two in the literal because you have to … Read more

Escape double quote in VB string

Escaping quotes in VB6 or VBScript strings is simple in theory although often frightening when viewed. You escape a double quote with another double quote. An example: “c:\program files\my app\app.exe” If I want to escape the double quotes so I could pass this to the shell execute function listed by Joe or the VB6 Shell … Read more

mysql_escape_string VS mysql_real_escape_string

The difference is that mysql_escape_string just treats the string as raw bytes, and adds escaping where it believes it’s appropriate. mysql_real_escape_string, on the other hand, uses the information about the character set used for the MySQL connection. This means the string is escaped while treating multi-byte characters properly; i.e., it won’t insert escaping characters in … Read more

Error in strings.xml file in Android

post your complete string. Though, my guess is there is an apostrophe (‘) character in your string. replace it with (\’) and it will fix the issue. for example, //strings.xml <string name=”terms”> Hey Mr. Android, are you stuck? Here, I\’ll clear a path for you. </string> Ref: http://www.mrexcel.com/forum/showthread.php?t=195353 https://code.google.com/archive/p/replicaisland/issues/48

python IDLE shell appears not to handle some escapes correctly

What am I doing wrong or what should I be looking for? Is it reasonable to expect backspace, specifically, to work? No, IDLE does not support backspace, nor carriage-return, nor formfeed, nor ANSI escape sequences. You are expecting \b to move the cursor one cell to the left in IDLE’s interactive shell window. It doesn’t … Read more