Re: regular expressions
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 12:46:37 +0100
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 ?
So if I create a new account with the password "1234567890ABCDEF", the
database will be updated to say that my password is "1234567890AB", but
the website never mentions that truncation has occured. Then when I try
to log on with the password "1234567890ABCDEF", it compares
"1234567890ABCDEF" (what I wrote) against "1234567890AB" (what's in the
DB), sees that they are not equal, and tell me that my password is
incorrect.
I think it was Sun who (inspired to a display of the very highest technical
standards), mapped my user-id and password to lower case before entering them
into the database, but didn't perform the same mapping when checking them
later...
-- chris
.
- Follow-Ups:
- Re: regular expressions
- From: Oliver Wong
- 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
- regular expressions
- Prev by Date: Java API
- Next by Date: Re: Incorrect "variable might not have been initialized"
- Previous by thread: Re: regular expressions
- Next by thread: Re: regular expressions
- Index(es):
Relevant Pages
|
|