Re: MD5 hash for url and utf unicode converting to ascii

2008-06-24 Thread Nick Craig-Wood
joe shoemaker <[EMAIL PROTECTED]> wrote: > I would like to convert url into md5 hash. My question is that md5 > hash will create collision at 2^64. If you do long(value,16), where > value is the md5 hash string, would value returned from long(value, > 16) be unique as long as md5 hashed string

Re: MD5 hash for url and utf unicode converting to ascii

2008-06-23 Thread Daniel Pitts
joe shoemaker wrote: I would like to convert url into md5 hash. My question is that md5 hash will create collision at 2^64. If you do long(value,16), where value is the md5 hash string, would value returned from long(value, 16) be unique as long as md5 hashed string is unique? when you move md5 h

MD5 hash for url and utf unicode converting to ascii

2008-06-23 Thread joe shoemaker
I would like to convert url into md5 hash. My question is that md5 hash will create collision at 2^64. If you do long(value,16), where value is the md5 hash string, would value returned from long(value, 16) be unique as long as md5 hashed string is unique? when you move md5 hashed string to long, w

Re: unicode converting

2005-03-16 Thread TZOTZIOY
On 16 Mar 2005 04:21:16 -0800, rumours say that "Serge Orlov" <[EMAIL PROTECTED]> might have written: >> On Windoze, Mandrake and SuSE python has UCS-2 >> unicode and Tkinter is working just fine. > >Did you build python on Mandrake and SuSE yourself? I had an impression >that ucs-4 builds are pre

Re: unicode converting

2005-03-16 Thread Serge Orlov
Christos TZOTZIOY Georgiou wrote: > On 16 Mar 2005 02:53:12 -0800, rumours say that "Serge Orlov" > <[EMAIL PROTECTED]> might have written: > > >3) There is a note in README: To compile > >Python2.3 with Tkinter, you will need to pass --enable-unicode=ucs4 > >flag to ./configure > > I thought this

Re: unicode converting

2005-03-16 Thread Maxim Kasimov
Serge Orlov wrote: utf-16 is basically a superset of ucs-2. See here for more detail: http://www.azillionmonkeys.com/qed/unicode.html If you ensure that ord() of each output character is < 0x1 you'll get valid ucs-2 output if you use utf-16 encoding. If you build python with --enable-unicode=uc

Re: unicode converting

2005-03-16 Thread TZOTZIOY
On 16 Mar 2005 02:53:12 -0800, rumours say that "Serge Orlov" <[EMAIL PROTECTED]> might have written: >3) There is a note in README: To compile >Python2.3 with Tkinter, you will need to pass --enable-unicode=ucs4 >flag to ./configure I thought this applied to Tkinter as pre-built on recent RedHat

Re: unicode converting

2005-03-16 Thread Serge Orlov
Maxim Kasimov wrote: > Christos TZOTZIOY Georgiou wrote: > > > > If unicode_data references your unicode data, all you have to send is: > > > > unicode_data.encode('utf-16') # maybe utf-16be for network order > > > is utf-16 string the same ucs-2? my question is how to get string > encoded as UCS-2

Re: unicode converting

2005-03-16 Thread Maxim Kasimov
Christos TZOTZIOY Georgiou wrote: If unicode_data references your unicode data, all you have to send is: unicode_data.encode('utf-16') # maybe utf-16be for network order is utf-16 string the same ucs-2? my question is how to get string encoded as UCS-2 -- Best regards, Maxim -- http://mail.python.

Re: unicode converting

2005-03-15 Thread Leif K-Brooks
Maxim Kasimov wrote: Diez B. Roggisch wrote: Maxim Kasimov wrote: there are a few questions i can find answer in manual: 1. how to define which is internal encoding of python unicode strings (UTF-8, UTF-16 ...) It shouldn't be your concern - but you can specify it using " ./configure --enable-uni

Re: unicode converting

2005-03-15 Thread TZOTZIOY
On Tue, 15 Mar 2005 18:54:20 +0200, rumours say that Maxim Kasimov <[EMAIL PROTECTED]> might have written: >> It shouldn't be your concern - but you can specify it using " ./configure >> --enable-unicode=ucs2" or --enable-unicode=ucs4. You can't set it to utf-8 >> or utf-16. >is that means that p

Re: unicode converting

2005-03-15 Thread Maxim Kasimov
Diez B. Roggisch wrote: Maxim Kasimov wrote: there are a few questions i can find answer in manual: 1. how to define which is internal encoding of python unicode strings (UTF-8, UTF-16 ...) It shouldn't be your concern - but you can specify it using " ./configure --enable-unicode=ucs2" or --enab

Re: unicode converting

2005-03-15 Thread Diez B. Roggisch
Maxim Kasimov wrote: > > there are a few questions i can find answer in manual: > 1. how to define which is internal encoding of python unicode strings > (UTF-8, UTF-16 ...) It shouldn't be your concern - but you can specify it using " ./configure --enable-unicode=ucs2" or --enable-unicode=ucs4

unicode converting

2005-03-15 Thread Maxim Kasimov
there are a few questions i can find answer in manual: 1. how to define which is internal encoding of python unicode strings (UTF-8, UTF-16 ...) 2. how to convert string to UCS-2 (Python 2.2.3 on freebsd4) -- Best regards, Maxim -- http://mail.python.org/mailman/listinfo/python-list