Okay so im working on this php image upload system but for some reason internet explorer turns my basepath into the same path, but with double backslashes instead of one; ie:
C:\\Documents and Settings\\kasper\\Bureaublad\\24.jpg
This needs to become C:\Documents and Settings\kasper\Bureaublad\24.jpg.
...
I've discovered that any time I do the following:
echo '<a href="http://" title="bla">huzzah</a>';
I end up with the following being rendered to the browser:
<a href="http:///" title="bla">huzzah</a>
This is particularly annoying when I link to a file with an extension, as it breaks the link.
Any ideas why this is happening and ho...
Hi,
I am porting a application written in c++ from windows to Linux. I have a problem with the header files path. Windows uses "\" and while Linux uses "/" . I am finding it cumbersome to change this in each and every source and header file. Is there some work around?
...
In MySQL, the following:
SELECT '\\' INTO OUTFILE 'c:/temp/backslash.dump';
writes two backslashes to the file, which makes sense.
Trying to dump a single backslash, I changed SQL_MODE, like that:
SET SESSION SQL_MODE='NO_BACKSLASH_ESCAPES';
SELECT '\' INTO OUTFILE 'c:/temp/backslash.dump';
but got two backslashes again.
Is t...
I'm a little confused about when to use single quoted strings versus double quoted strings. I've noticed that if I put a variable inside a single quoted string, it doesn't get interpreted. Also, if I use a newline character in a double quoted string, it causes the string to be displayed over two lines whereas in a single quoted string th...
Hello,
Does JavaScript have a built-in function like PHP's addslashes (or addcslashes) function to add backslashes to characters that need escaping in a string?
For example, this:
This is a demo string with
'single-quotes' and "double-quotes".
...would become:
This is a demo string with
\'single-quotes\' and
\"double-qu...
Update:
I can make this a simpler problem to solve:
I want to figure out what the correct regex would be to substitute any single occurrence of a back slash with two back slashes.
I want to turn this:
vlc.plugin.path = C:\Program Files\JekyllV0.9.2\\VLC_1.0.0\\plugins
into:
vlc.plugin.path = C:\\Program Files\\JekyllV0.9.2\\VLC_1....
I don't understand this Ruby code:
>> puts '\\ <- single backslash'
# \ <- single backslash
>> puts '\\ <- 2x a, because 2 backslashes get replaced'.sub(/\\/, 'aa')
# aa <- 2x a, because two backslashes get replaced
so far, all as expected. but if we search for 1 with /\\/, and replace with 2, encoded by '\\\\', why do we get this:
...
it seems windows insist on writing this slash on files' path \, while .net's URI class writing this the other way?
Is there any right way? that is accepted even in the most primitive systems?
And why the .net's URI is showing the other slash than windows does?
Thanks.
...
I have some code to encrypt some strings in Python. Encrypted text is used as a parameter in some urls, but after encrypting, there comes backslashes in string and I cannot use single backslash in urllib2.urlopen.
I cannot replace single backslash with double. For example:
print cipherText
'\t3-@\xab7+\xc7\x93H\xdc\xd1\x13G\xe1\xfb'
...
Hi there,
I'm loosing my hair trying to figure out why net.sf.json.JSONObject add extra backslash where it shouldn't on my java code :
JSONObject obj = new JSONObject ();
obj.element ("column_name", "<a href=\"#\" title=\"test\">Test !</a>");
will output :
<a href=\"#\" title=\"test\">Test !<\/a>
with an extra "\" near <\/a>.
How...
I have a string that after print is like this: \x4d\xff\xfd\x00\x02\x8f\x0e\x80\x66\x48\x71
But I want to change this string to "\x4d\xff\xfd\x00\x02\x8f\x0e\x80\x66\x48\x71" which is not printable (it is necessary to write to serial port). I know that it ist problem with '\'. how can I replace this printable backslashes to unprintable?...