I am trying to include a " in my string but it keeps thinking its an end string so I need the proper number or whatever it is called. For instance 100 is 'd', so what number corresponds with a double quote?
Thanks guys - for some reason VB thinks asc(34) = 51
but thankfully I'm able to use single quotes so I got past this problem for now Dunno why #34 isn't a double though...
Skoob...try 034 like Yo_Ma-Ma said...I don't know how VB works, but in java you'd just use \" as an escape sequence, or (char)(34)...using 034 in java gives small rotated "L" type character though, like the one I'm using as a gun in my sig, except for upside down
<< Skoob...try 034 like Yo_Ma-Ma said...I don't know how VB works, but in java you'd just use \" as an escape sequence, or (char)(34)...using 034 in java gives small rotated "L" type character though, like the one I'm using as a gun in my sig, except for upside down >>
I can't recall for sure, but I think the /xxx escape sequences in Java and C are interpreted as hex escape values instead of decimal. This could be why you are getting odd characters.
<< Skoob...try 034 like Yo_Ma-Ma said...I don't know how VB works, but in java you'd just use \" as an escape sequence, or (char)(34)...using 034 in java gives small rotated "L" type character though, like the one I'm using as a gun in my sig, except for upside down >>
I can't recall for sure, but I think the /xxx escape sequences in Java and C are interpreted as hex escape values instead of decimal. This could be why you are getting odd characters. >>
You don't put numbers in an escape sequence...they're just for showing characters otherwise reserved in Java when working with strings (ie. \", \', \\, \n, \b, \r, \t). I got the odd character when I cast 034 to a character, (char)(034), but I got the correct character when doing (char)(34).
<< Skoob...try 034 like Yo_Ma-Ma said...I don't know how VB works, but in java you'd just use \" as an escape sequence, or (char)(34)...using 034 in java gives small rotated "L" type character though, like the one I'm using as a gun in my sig, except for upside down >>
I can't recall for sure, but I think the /xxx escape sequences in Java and C are interpreted as hex escape values instead of decimal. This could be why you are getting odd characters. >>
You don't put numbers in an escape sequence...they're just for showing characters otherwise reserved in Java when working with strings (ie. \", \', \\, \n, \b, \r, \t). I got the odd character when I cast 034 to a character, (char)(034), but I got the correct character when doing (char)(34). >>
It is not normally used, but escape sequences like \065 are valid in C and Java. Try some thing like "\065" and you should get a character. Java calls these Unicode escape sequences. So println("\065" should give you A as the outputI believe. Sorry can't test this as I do not have a development environment now.
Mapidus - ahhh, I see. BUT, that still doesn't work "correctly". Using either 065 or 65 gives me "5", instead of "A". I'm using Java(R) 2 SDK Standard Edition Version 1.2.1...
maybe try \041 or \101 for A. I think that Java expects the Hex ASCII numbering (maybe the Oct numbering, not sure) instead of the decimal ones. The following chart gives you the Dec, Hex, and Oct ASCII values. If you want the characters that are in unicode but not in ASCII I think you can use \uXXXX, where the XXXX is the hexadecimal unicode value for that character so \u0041 should give A I think. Sorry, still can't test any of this because I do not have the JDK installed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.