Re: regular expressions
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 13:46:45 GMT
"Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:444f5db2$1$653$bed64819@xxxxxxxxxxxxxxxxxxxx
Oliver Wong wrote:
To test whether a given unicode character is outside of (or inside of,
for that matter) ASCII, you could serialize it to ASCII, then re-read the
ASCII data back into an in-memory Java string, and check if you still have
the same original character that you started with.
What's wrong with just testing whether it's < 128 ?
Erm, er... I was trying to write code that didn't depend on the internal encoding being UTF-16. Yeah, that's it. More robust and all that. I mean, what if in Java 7, they decide to switch to EBCDIC internally, huh?
- Oliver
.
- Follow-Ups:
- Re: regular expressions
- From: Chris Uppal
- Re: regular expressions
- From: Roedy Green
- Re: regular expressions
- From: Morten Alver
- Re: regular expressions
- References:
- regular expressions
- From: 2rajesh . b
- Re: regular expressions
- From: Oliver Wong
- Re: regular expressions
- From: Roedy Green
- Re: regular expressions
- From: Oliver Wong
- Re: regular expressions
- From: Chris Uppal
- regular expressions
- Prev by Date: Re: can i submit 2 jsp pages to the server at a single button click.
- Next by Date: Re: Making Java extinct!
- Previous by thread: Re: regular expressions
- Next by thread: Re: regular expressions
- Index(es):