Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   illegal escape character (http://www.velocityreviews.com/forums/t297745-illegal-escape-character.html)

Steve Rainbird 06-07-2006 04:49 PM

illegal escape character
 
Any ideas why I get the following syntax error?

illegal escape character
wsV1 = "\x1c";

--
Steve

Remove "nospam" from email address to reply to me personally



Hendrik Maryns 06-07-2006 05:09 PM

Re: illegal escape character
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve Rainbird schreef:
> Any ideas why I get the following syntax error?
>
> illegal escape character
> wsV1 = "\x1c";


"\\x1c", see http://mindprod.com/jgloss/regex.html#QUOTING

HTH, H.

- --
Hendrik Maryns

==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEhwhDe+7xMGD3itQRAnbNAJ9Yz8GkjNgeFmA2XD4+Ub Y1ia88ZQCeJ45A
STYGDuE4yWD/CjIIv0p6dzY=
=2te7
-----END PGP SIGNATURE-----

Steve Rainbird 06-07-2006 06:18 PM

Re: illegal escape character
 
"Hendrik Maryns" <hendrik_maryns@despammed.com> wrote in message
news:e67183$t0d$1@newsserv.zdv.uni-tuebingen.de...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Steve Rainbird schreef:
>> Any ideas why I get the following syntax error?
>>
>> illegal escape character
>> wsV1 = "\x1c";

>
> "\\x1c", see http://mindprod.com/jgloss/regex.html#QUOTING
>
> HTH, H.
>
> - --
> Hendrik Maryns
>
> ==================
> http://aouw.org
> Ask smart questions, get good answers:
> http://www.catb.org/~esr/faqs/smart-questions.html
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
>
> iD8DBQFEhwhDe+7xMGD3itQRAnbNAJ9Yz8GkjNgeFmA2XD4+Ub Y1ia88ZQCeJ45A
> STYGDuE4yWD/CjIIv0p6dzY=
> =2te7
> -----END PGP SIGNATURE-----



Hendrik,

thanks for helping but what I actually meant by this is the "hex 1c" like in
c.

I know I can have

wsV1 = "\u001c";

But my manual says I can use "\x" as well.



--
Steve

Remove "nospam" from email address to reply to me personally



Andy Flowers 06-07-2006 06:28 PM

Re: illegal escape character
 
Steve Rainbird wrote:
> "Hendrik Maryns" <hendrik_maryns@despammed.com> wrote in message
> news:e67183$t0d$1@newsserv.zdv.uni-tuebingen.de...
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Steve Rainbird schreef:
>>> Any ideas why I get the following syntax error?
>>>
>>> illegal escape character
>>> wsV1 = "\x1c";

>> "\\x1c", see http://mindprod.com/jgloss/regex.html#QUOTING


>
> But my manual says I can use "\x" as well.
>
>
>


See http://mindprod.com/jgloss/literals.html. \x isn't supported in Java.

Which manual are you using ?

Thomas Fritsch 06-07-2006 08:59 PM

Re: illegal escape character
 
"Steve Rainbird" <news.nospam@rainbird.me.nospam.uk> wrote:
> thanks for helping but what I actually meant by this is the "hex 1c" like
> in c.
>
> I know I can have
>
> wsV1 = "\u001c";
>
> But my manual says I can use "\x" as well.

Your manual is wrong!
See the ultimate reference at
http://java.sun.com/docs/books/jls/t...al.html#3.10.6
("Escape Sequences for Character and String Literals"). You see: "\x" is not
listed as a valid escape sequence.

--
Thomas



Steve Rainbird 06-07-2006 10:16 PM

Re: illegal escape character
 
"Andy Flowers" <no.way@hose.com> wrote in message
news:SUEhg.209$s4.180@newsfe3-win.ntli.net...
> Steve Rainbird wrote:
>> "Hendrik Maryns" <hendrik_maryns@despammed.com> wrote in message
>> news:e67183$t0d$1@newsserv.zdv.uni-tuebingen.de...
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Steve Rainbird schreef:
>>>> Any ideas why I get the following syntax error?
>>>>
>>>> illegal escape character
>>>> wsV1 = "\x1c";
>>> "\\x1c", see http://mindprod.com/jgloss/regex.html#QUOTING

>
>>
>> But my manual says I can use "\x" as well.
>>
>>
>>

>
> See http://mindprod.com/jgloss/literals.html. \x isn't supported in Java.
>
> Which manual are you using ?



SAMS Teach yourself java 2 in 21 days.

--
Steve

Remove "nospam" from email address to reply to me personally



Steve Rainbird 06-07-2006 10:20 PM

Re: illegal escape character
 
"Thomas Fritsch" <i.dont.like.spam@invalid.com> wrote in message
news:e67egc$528$02$1@news.t-online.com...
> "Steve Rainbird" <news.nospam@rainbird.me.nospam.uk> wrote:
>> thanks for helping but what I actually meant by this is the "hex 1c" like
>> in c.
>>
>> I know I can have
>>
>> wsV1 = "\u001c";
>>
>> But my manual says I can use "\x" as well.

> Your manual is wrong!
> See the ultimate reference at
> http://java.sun.com/docs/books/jls/t...al.html#3.10.6
> ("Escape Sequences for Character and String Literals"). You see: "\x" is
> not listed as a valid escape sequence.
>
> --
> Thomas
>



So it seems. Thanks everybody at least that explains it.

--
Steve

Remove "nospam" from email address to reply to me personally



Mark Space 06-07-2006 11:00 PM

Re: illegal escape character
 
Steve Rainbird wrote:
> SAMS Teach yourself java 2 in 21 days.
>


SAMS sux! ;)


All times are GMT. The time now is 07:38 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57