Re: regular expressions



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



.



Relevant Pages

  • Re: OK, stupid question about picture managment programs...
    ... >I wrote a database program in 1984, all using unix shell scripts ... >and creating a set of ascii files that get searched linearly. ... I'm no database administrator, but I suspect that you are vastly ...
    (rec.photo.digital)
  • Re: UTF8 to Unicode conversion
    ... 256 character ASCII. ... without even having to go to Unicode or anything ... Then a program will manipulate that database and create a Microsoft ...
    (comp.lang.perl)
  • Re: ascii to latin1
    ... Data contained in the database is mixed. ... You need to covert from latin1 to ascii not from ascii to latin1. ...
    (comp.lang.python)
  • Text Encoding - Like Wrestling Oiled Pigs
    ... I've got a database of information that is encoded in Windows/CP1252. ... What I want to do is dump this to a UTF-8 encoded text file (a RSS ... 'ascii' codec can't decode byte 0x92 in position ... So somewhere I'm missing an implicit conversion to ASCII which is ...
    (comp.lang.python)
  • Re: regular expressions
    ... 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 ... I was trying to write code that didn't depend on the internal encoding being UTF-16. ...
    (comp.lang.java.programmer)