Re: Javascript - Python RSA encryption interoperability

2008-07-17 Thread Evren Esat Ozkan
Hi, Thank you very much. Your code is worked like a charm and saved my honeymoon :) Thanks again, Evren On Jul 4, 6:19 pm, [EMAIL PROTECTED] wrote: > Evren Esat Ozkan napisa³(a): > > > > > > > Hello, > > > I'm trying to encrypt a string with RSA. But it

Javascript - Python RSA encryption interoperability

2008-07-04 Thread Evren Esat Ozkan
Hello, I'm trying to encrypt a string with RSA. But it needs to be compitable with Dave's JavaScript RSA implementation*. I'm already read and tried lots of different things about RSA and RSA in Python. But could not produce the same result with the javascript library. My experiments could be see

Re: urllib.urlencode wrongly encoding ± character

2006-04-07 Thread Evren Esat Ozkan
I copied and pasted my code to new file and saved with utf-8 encoding. it produced 00090%C2%B1NO%3A%C2%B1H%C2%B1H%C2%B1H%C2%B1H%C2%B1 Than I added "u" to decleration and encode it with iso-8859-1 as you wrote and finally it produced proper result. Your reply is so helped and clarify some things ab

Re: urllib.urlencode wrongly encoding ± character

2006-04-07 Thread Evren Esat Ozkan
Ok, I think this code snippet enough to show what i said; === #!/usr/bin/env python # -*- coding: utf-8 -*- #Change utf-8 to latin-1 #Or move variable decleration to another file than import it val='00090±NO:±H±H±H±H±' from urllib import urlencode data={'key':v

Re: urllib.urlencode wrongly encoding ± character

2006-04-06 Thread Evren Esat Ozkan
I'm just discovered that I don't have to remove that line, just change utf-8 to iso-8859-9 and it worked again. But I want to use utf-8. Please advise... -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib.urlencode wrongly encoding ± character

2006-04-06 Thread Evren Esat Ozkan
when I remove "# -*- coding: utf-8 -*-" line from start of the script it worked properly. So I moved variable decleration to another file and imported than it worked too. Now it's working but I dont understand what I'm doing wrong? I'm new to Python and unicode encoding. I'm tried encode/decode