Re: Unicode issue with Python v3.3

2013-04-19 Thread Νίκος Γκρ33κ
Hello Cameron, Did you received my yesterday's mail? -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-17 Thread nagia . retsina
Τη Κυριακή, 14 Απριλίου 2013 12:28:32 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 13Apr2013 23:00, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | root@nikos [/home/nikos/public_html/foo-py]# pwd | /home/nikos/public_html/foo-py | root@nikos

Re: Unicode issue with Python v3.3

2013-04-17 Thread Chris Angelico
On Wed, Apr 17, 2013 at 4:56 PM, nagia.rets...@gmail.com wrote: can you help please or tell me what else i need to try? You need to try trimming quoted text in replies, not double-spacing, and paying for help. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-17 Thread Chris Angelico
On Wed, Apr 17, 2013 at 4:56 PM, nagia.rets...@gmail.com wrote: can you help please or tell me what else i need to try? You need to try trimming quoted text in replies, not double-spacing, and paying for help. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-17 Thread Cameron Simpson
On 14Apr2013 04:22, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | | Cameron would it be too much to ask to provide you with root | | access to my VPS server so you can have a look there too? | | i can pay you if you like if you wait a few days to gather some money. | | I really do

Re: Unicode issue with Python v3.3

2013-04-17 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 18 Απριλίου 2013 2:00:48 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: Reply to this message. I will email you my ssh public key. Please make me an _ordinary_ user account called cameron and send me the ssh details of your VPS. Thank you very much Cameron, i appreciate all your

Re: Unicode issue with Python v3.3

2013-04-15 Thread Νίκος Γκρ33κ
Hello, can you still help me please? -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-14 Thread nagia . retsina
tried to change print() with sys.stdout.buffer() but still i get the same unicode issue. I don't know what to try anymore. root@nikos [/home/nikos/public_html/foo-py]# pwd /home/nikos/public_html/foo-py root@nikos [/home/nikos/public_html/foo-py]# cat foo.py #!/bin/sh exec 2/home/nikos

Re: Unicode issue with Python v3.3

2013-04-14 Thread Cameron Simpson
On 13Apr2013 23:00, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | root@nikos [/home/nikos/public_html/foo-py]# pwd | /home/nikos/public_html/foo-py | root@nikos [/home/nikos/public_html/foo-py]# cat foo.py | #!/bin/sh | exec 2/home/nikos/cgi.err.out | echo $0 $* 2 | id 2 | env | sort 2

Re: Unicode issue with Python v3.3

2013-04-14 Thread nagia . retsina
Τη Κυριακή, 14 Απριλίου 2013 12:28:32 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 13Apr2013 23:00, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | root@nikos [/home/nikos/public_html/foo-py]# pwd | /home/nikos/public_html/foo-py | root@nikos

Re: Unicode issue with Python v3.3

2013-04-13 Thread Cameron Simpson
On 12Apr2013 21:50, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | Ookey after that is corrected, i then tried the plain solution and i got this response back form the shell: | | Traceback (most recent call last): | File metrites.py, line 213, in lt;modulegt; | htmldata =

Re: Unicode issue with Python v3.3

2013-04-13 Thread nagia . retsina
Τη Σάββατο, 13 Απριλίου 2013 1:28:07 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 12Apr2013 21:50, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | Ookey after that is corrected, i then tried the plain solution and i got this response back form the shell: | | Traceback

Re: Unicode issue with Python v3.3

2013-04-13 Thread Chris Angelico
On Sun, Apr 14, 2013 at 12:16 AM, nagia.rets...@gmail.com wrote: Also i have foudn the error log and i tried to view it but it was empty and then i removed it and then run the script both from shell and broswer but it didnt reappeared. root@macgyver [/home/nikos/public_html/cgi-bin]# cat

Re: Unicode issue with Python v3.3

2013-04-13 Thread Cameron Simpson
On 13Apr2013 07:16, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | root@macgyver [/home/nikos/public_html/cgi-bin]# ls ../cgi.err.out | ../cgi.err.out I prefer ls -ld myself. | root@macgyver [/home/nikos/public_html/cgi-bin]# cat ../cgi.err.out | | Also i have foudn the error log

Re: Unicode issue with Python v3.3

2013-04-12 Thread nagia . retsina
Someone HEELP ME!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-12 Thread Chris Angelico
On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote: Someone HEELP ME!! http://youtu.be/VxMYwjp8t0o ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-12 Thread nagia . retsina
Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote: Someone HEELP ME!! http://youtu.be/VxMYwjp8t0o ChrisA Well, instead of being a smartass it would be nice if

Re: Unicode issue with Python v3.3

2013-04-12 Thread Chris Angelico
On Fri, Apr 12, 2013 at 11:18 PM, nagia.rets...@gmail.com wrote: Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote: Someone HEELP ME!! http://youtu.be/VxMYwjp8t0o ChrisA

Re: Unicode issue with Python v3.3

2013-04-12 Thread rusi
On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Fri, Apr 12, 2013 at 10:50 PM,  nagia.rets...@gmail.com wrote: Someone HEELP ME!! http://youtu.be/VxMYwjp8t0o ChrisA Well,

Re: Unicode issue with Python v3.3

2013-04-12 Thread nagia . retsina
Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε: On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Fri, Apr 12, 2013 at 10:50 PM,  nagia.rets...@gmail.com wrote:

Re: Unicode issue with Python v3.3

2013-04-12 Thread Ian Kelly
On Fri, Apr 12, 2013 at 8:36 AM, nagia.rets...@gmail.com wrote: Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε: On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: Well, instead of being a smartass it would be nice if you could actually help for once.

Re: Unicode issue with Python v3.3

2013-04-12 Thread Roy Smith
In article mailman.533.1365792239.3114.python-l...@python.org, Ian Kelly ian.g.ke...@gmail.com wrote: I would also recommend that in the future you should stop deploying untested code to your production website. Set up a development environment for yourself, make the changes there, and only

Re: Unicode issue with Python v3.3

2013-04-12 Thread nagia . retsina
Τη Παρασκευή, 12 Απριλίου 2013 9:37:29 μ.μ. UTC+3, ο χρήστης Ian έγραψε: On Fri, Apr 12, 2013 at 8:36 AM, nagia.rets...@gmail.com wrote: Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε: On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: Well, instead of

Re: Unicode issue with Python v3.3

2013-04-12 Thread Cameron Simpson
On 11Apr2013 09:55, Nikos nagia.rets...@gmail.com wrote: | Τη Πέμπτη, 11 Απριλίου 2013 1:45:22 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: | On 10Apr2013 21:50, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | | the doctype is coming form the attempt of script metrites.py to open and

Re: Unicode issue with Python v3.3

2013-04-12 Thread nagia . retsina
Τη Σάββατο, 13 Απριλίου 2013 4:41:57 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 11Apr2013 09:55, Nikos nagia.rets...@gmail.com wrote: | Τη Πέμπτη, 11 Απριλίου 2013 1:45:22 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: | On 10Apr2013 21:50, nagia.rets...@gmail.com

Re: Unicode issue with Python v3.3

2013-04-11 Thread nagia . retsina
Since now we k ow the problem maybe we can tell metrites.py to open index.html using utf-8 encoding rather as binary, dont you think? -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-11 Thread Steven D'Aprano
On Thu, 11 Apr 2013 00:13:46 -0700, nagia.retsina wrote: Since now we k ow the problem maybe we can tell metrites.py to open index.html using utf-8 encoding rather as binary, dont you think? What makes you think it is UTF-8? Last time you tried decoding content as UTF-8, you got an error that

Re: Unicode issue with Python v3.3

2013-04-11 Thread Steven D'Aprano
On Thu, 11 Apr 2013 07:50:19 +, Steven D'Aprano wrote: On Thu, 11 Apr 2013 00:13:46 -0700, nagia.retsina wrote: Since now we k ow the problem maybe we can tell metrites.py to open index.html using utf-8 encoding rather as binary, dont you think? What makes you think it is UTF-8?

Re: Unicode issue with Python v3.3

2013-04-11 Thread nagia . retsina
Τη Πέμπτη, 11 Απριλίου 2013 11:20:47 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: On Thu, 11 Apr 2013 07:50:19 +, Steven D'Aprano wrote: On Thu, 11 Apr 2013 00:13:46 -0700, nagia.retsina wrote: Since now we k ow the problem maybe we can tell metrites.py to open

Re: Unicode issue with Python v3.3

2013-04-11 Thread Lele Gaifax
nagia.rets...@gmail.com writes: metrites.py tries to open that script so we must tell it to open as utf-8 text and not as a binary file. One way is the following: from codecs import open with open('index.html', encoding='utf-8') as f: content = f.read() ciao, lele. --

Re: Unicode issue with Python v3.3

2013-04-11 Thread Cameron Simpson
On 10Apr2013 21:50, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | Firtly thank uou for taking a look into the code. | the doctype is coming form the attempt of script metrites.py to open and read the 'index.html' file. | But i don't know how to try to open it as a byte file instead of

Re: Unicode issue with Python v3.3

2013-04-11 Thread nagia . retsina
Of course here is how it look like: if page.endswith('.html'): f = open( /home/nikos/www/ + page, encoding=utf-8 ) htmldata = f.read() htmldata = htmldata % (quote, music) counter = ''' center

Re: Unicode issue with Python v3.3

2013-04-11 Thread Nikos
Τη Πέμπτη, 11 Απριλίου 2013 1:45:22 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 10Apr2013 21:50, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote: | Firtly thank uou for taking a look into the code. | the doctype is coming form the attempt of script metrites.py to open and read

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-11 Thread Michael Torrie
On 04/10/2013 10:50 AM, Νίκος Γκρ33κ wrote: I'am not sure i follow you. How did my topic changed?! Is this possible? This is a mailing list/nntp newsgroup. The subject line can be changed arbitrarily by anyone replying to another message. Normally this is done to indicate a natural

Re: Unicode issue with Python v3.3

2013-04-11 Thread nagia . retsina
Well, can somebody else propose somehting plz? i have paste the whole script and even the necessary snippet that perhaps causing this encoding confusion in 3.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-11 Thread alex23
On Apr 12, 2:36 pm, nagia.rets...@gmail.com wrote: Well, can somebody else propose somehting plz? Pay for a professional. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-10 Thread rusi
On Apr 10, 10:06 am, rusi rustompm...@gmail.com wrote: An interesting case of two threads: On Apr 10, 9:46 am, Chris Angelico ros...@gmail.com wrote: On Wed, Apr 10, 2013 at 2:25 PM, Steven D'Aprano Obviously you know what the problem is much better than the Python interpreter. I

Re: Unicode issue with Python v3.3

2013-04-10 Thread Antoine Pitrou
rusi rustompmody at gmail.com writes: Hmm I see some cut-paste goofup on my part. I was meaning to juxtapose this thread where we put up with inordinate amount of nonsense from OP along with the recent thread in which a newcomer who thinks he has found a bug in pdb is made fun of. Then

Re: Unicode issue with Python v3.3

2013-04-10 Thread nagia . retsina
Τη Τετάρτη, 10 Απριλίου 2013 7:25:21 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: What does os.environ['REMOTE_ADDR'] give? Until you answer that question, you won't make any progress. I insists stevv. Look at what 'python3 metrites.py' gives me !-- The above is a description of an error

Re: Unicode issue with Python v3.3

2013-04-10 Thread Νίκος Γκρ33κ
Here is the whole code for metrites.py in case someone wants to take allok. Everything is correct after altering it to meet python 3.3, everythign aprt from the weird unicode error thing. http://pastebin.com/5Mpjx5Fd please take a look. Thank you. --

Re: Unicode issue with Python v3.3

2013-04-10 Thread Steven D'Aprano
On Tue, 09 Apr 2013 23:04:35 -0700, rusi wrote: Hmm I see some cut-paste goofup on my part. I was meaning to juxtapose this thread where we put up with inordinate amount of nonsense from OP along with the recent thread in which a newcomer who thinks he has found a bug in pdb is made fun of.

People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Steven D'Aprano
On Wed, 10 Apr 2013 08:28:55 +, Steven D'Aprano wrote: If you want to be helpful, how about leading by example and taking on some of the less coherent newbie questions [...] On that note, I think I'll take the opportunity to give thanks to Peter Otten, who (if I remember correctly) has

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Mark Lawrence
On 10/04/2013 09:34, Steven D'Aprano wrote: On that note, I think I'll take the opportunity to give thanks to Peter Otten, who (if I remember correctly) has been here for longer than I have, and I've been here for a long time. In all that time, I don't think I've ever seen him snap at or be

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Νίκος Γκρ33κ
os.environ['HTTP_USER_AGENT'] is only set when running from browser. so i faked it by using: userinfo = os.environ.get('HTTP_USER_AGENT', 'some default') but the encoding issues are still there. -- http://mail.python.org/mailman/listinfo/python-list

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Νίκος Γκρ33κ
Thank you just altered it but i still get the same encoding issues. please its only a matter of simple alternation that iam not able to see. When you have the time plz take a look. Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Peter Otten
Steven D'Aprano wrote: On Wed, 10 Apr 2013 08:28:55 +, Steven D'Aprano wrote: If you want to be helpful, how about leading by example and taking on some of the less coherent newbie questions [...] On that note, I think I'll take the opportunity to give thanks to Peter Otten, who

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Peter Otten
Mark Lawrence wrote: On 10/04/2013 09:34, Steven D'Aprano wrote: On that note, I think I'll take the opportunity to give thanks to Peter Otten, who (if I remember correctly) has been here for longer than I have, and I've been here for a long time. In all that time, I don't think I've ever

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Νίκος Γκρ33κ
Anyone please? -- http://mail.python.org/mailman/listinfo/python-list

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Mark Lawrence
On 10/04/2013 15:43, Νίκος Γκρ33κ wrote: Anyone please? I have already shown my support for Peter Otten on this thread. Are you asking for more people to do so? -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence --

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Chris Angelico
On Thu, Apr 11, 2013 at 1:15 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 10/04/2013 15:43, Νίκος Γκρ33κ wrote: Anyone please? I have already shown my support for Peter Otten on this thread. Are you asking for more people to do so? Sure, I can! He's one of the people who keeps this

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-10 Thread Νίκος Γκρ33κ
I'am not sure i follow you. How did my topic changed?! Is this possible? How about the oce i posted at patebin.com. Did anyone by any chnace had a look into? It's only a single thing iam missing for the encoding and the the script will load properly with python 3.3 --

Re: Unicode issue with Python v3.3

2013-04-10 Thread Nobody
On Wed, 10 Apr 2013 00:23:46 -0700, nagia.retsina wrote: Look at what 'python3 metrites.py' gives me File /root/.local/lib/python2.7/lib/python3.3/os.py, line 669, ... ^^^ ^^^ -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-10 Thread Νίκος Γκρ33κ
Τη Τετάρτη, 10 Απριλίου 2013 9:08:38 μ.μ. UTC+3, ο χρήστης Nobody έγραψε: On Wed, 10 Apr 2013 00:23:46 -0700, nagia.retsina wrote: Look at what 'python3 metrites.py' gives me File /root/.local/lib/python2.7/lib/python3.3/os.py, line 669, ...

Re: Unicode issue with Python v3.3

2013-04-10 Thread Ian Kelly
On Wed, Apr 10, 2013 at 12:25 PM, Νίκος Γκρ33κ nikos.gr...@gmail.com wrote: Τη Τετάρτη, 10 Απριλίου 2013 9:08:38 μ.μ. UTC+3, ο χρήστης Nobody έγραψε: On Wed, 10 Apr 2013 00:23:46 -0700, nagia.retsina wrote: Look at what 'python3 metrites.py' gives me File

Re: Unicode issue with Python v3.3

2013-04-10 Thread Arnaud Delobelle
On 10 April 2013 09:28, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Tue, 09 Apr 2013 23:04:35 -0700, rusi wrote: [...] I think it is quite unfair of you to mischaracterise the entire community response in this way. One person made a light-hearted, silly, unhelpful response.

Re: Unicode issue with Python v3.3

2013-04-10 Thread Cameron Simpson
On 10Apr2013 01:06, Νίκος Γκρ33κ nikos.gr...@gmail.com wrote: | Here is the whole code for metrites.py in case someone wants to take allok. | | Everything is correct after altering it to meet python 3.3, | everythign aprt from the weird unicode error thing. | | http://pastebin.com/5Mpjx5Fd | |

Re: Unicode issue with Python v3.3

2013-04-10 Thread nagia . retsina
Firtly thank uou for taking a look into the code. the doctype is coming form the attempt of script metrites.py to open and read the 'index.html' file. But i don't know how to try to open it as a byte file instead of an tetxt file. -- http://mail.python.org/mailman/listinfo/python-list

Unicode issue with Python v3.3

2013-04-09 Thread Νίκος Γκρ33κ
Hello, iam still trying to alter the code form python 2.6 = 3.3 Everyrging its setup except that unicode error that you can see if you go to http://superhost.gr Can anyone help with this? I even tried to change print() with sys.stdout.buffer() but still i get the same unicode issue. I don't

Re: Unicode issue with Python v3.3

2013-04-09 Thread Ian Kelly
() with sys.stdout.buffer() but still i get the same unicode issue. I don't know what to try anymore. It seems to be failing on the line: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] So the obvious question to ask is: what are the contents of os.environ['REMOTE_ADDR'] when

Re: Unicode issue with Python v3.3

2013-04-09 Thread nagia . retsina
to http://superhost.gr Can anyone help with this? I even tried to change print() with sys.stdout.buffer() but still i get the same unicode issue. I don't know what to try anymore. It seems to be failing on the line: host = socket.gethostbyaddr( os.environ

Re: Unicode issue with Python v3.3

2013-04-09 Thread Steven D'Aprano
setup except that unicode error that you can see if you go to http://superhost.gr Can anyone help with this? I even tried to change print() with sys.stdout.buffer() but still i get the same unicode issue. I don't know what to try anymore. It seems to be failing on the line

Re: Unicode issue with Python v3.3

2013-04-09 Thread Chris Angelico
wrote: Hello, iam still trying to alter the code form python 2.6 = 3.3 Everyrging its setup except that unicode error that you can see if you go to http://superhost.gr Can anyone help with this? I even tried to change print() with sys.stdout.buffer() but still i get the same unicode

Re: Unicode issue with Python v3.3

2013-04-09 Thread rusi
An interesting case of two threads: On Apr 10, 9:46 am, Chris Angelico ros...@gmail.com wrote: On Wed, Apr 10, 2013 at 2:25 PM, Steven D'Aprano Obviously you know what the problem is much better than the Python interpreter. I just went to the page and it started playing sound. Between

[issue6077] Unicode issue with tempfile on Windows

2009-11-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Fixed with r76593 (py3k) and r76594 (release31-maint) -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6077

[issue6077] Unicode issue with tempfile on Windows

2009-11-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +IO -Library (Lib) priority: - normal stage: - patch review versions: +Python 3.1, Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6077

[issue6077] Unicode issue with tempfile on Windows

2009-11-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch looks ok to me. -- assignee: - amaury.forgeotdarc nosy: +pitrou resolution: - accepted stage: patch review - commit review ___ Python tracker rep...@bugs.python.org

Re: unicode issue

2009-10-06 Thread Gabriel Genellina
En Thu, 01 Oct 2009 12:10:58 -0300, Walter Dörwald wal...@livinglogic.de escribió: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: _MAP = { # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C',

Re: unicode issue

2009-10-01 Thread gentlestone
save in utf-8 the coding declaration also has to be utf-8 ok, I understand, but what's the problem? Unfortunately seems to be the Python interactive mode doesn't have unicode support. It recognize the latin-1 encoding only. So I have 2 options, how to write doctest: 1. Replace native charaters

Re: unicode issue

2009-10-01 Thread Dave Angel
gentlestone wrote: save in utf-8 the coding declaration also has to be utf-8 ok, I understand, but what's the problem? Unfortunately seems to be the Python interactive mode doesn't have unicode support. It recognize the latin-1 encoding only. So I have 2 options, how to write doctest: 1.

Re: unicode issue

2009-10-01 Thread Hyuga
On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? _MAP = {     # LATIN     u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C',     u'È': 'E', u'É': 'E', u'Ê': 'E', u'Ë': 'E',

Re: unicode issue

2009-10-01 Thread Walter Dörwald
On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? _MAP = { # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C', u'È': 'E',

Re: unicode issue

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald wal...@livinglogic.de wrote: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip _MAP] def downcode(name):

Re: unicode issue

2009-10-01 Thread Walter Dörwald
On 01.10.09 17:50, Rami Chowdhury wrote: On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald wal...@livinglogic.de wrote: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip

Re: unicode issue

2009-10-01 Thread Peter Otten
Rami Chowdhury wrote: On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald wal...@livinglogic.de wrote: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip _MAP] def

Re: unicode issue

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 09:03:38 -0700, Walter Dörwald wal...@livinglogic.de wrote: Yes, but any accented characters have been split into the base character and the combining accent via normalize() before, so only the accent gets removed. Of course non-decomposable characters will be removed

unicode issue

2009-09-30 Thread gentlestone
Why don't work this code on Python 2.6? Or how can I do this job? _MAP = { # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C', u'È': 'E', u'É': 'E', u'Ê': 'E', u'Ë': 'E', u'Ì': 'I', u'Í': 'I', u'Î': 'I', u'Ï': 'I', u'Ð': 'D', u'Ñ': 'N',

Re: unicode issue

2009-09-30 Thread Andre Engels
On Wed, Sep 30, 2009 at 9:34 AM, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? Please be more specific than it doesn't work: * What exactly are you doing * What were you expecting the result of that to be * What is the actual result?

Re: unicode issue

2009-09-30 Thread gentlestone
On 30. Sep., 09:41 h., Andre Engels andreeng...@gmail.com wrote: On Wed, Sep 30, 2009 at 9:34 AM, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? Please be more specific than it doesn't work: * What exactly are you doing * What

Re: unicode issue

2009-09-30 Thread Andre Engels
I get the feeling that the problem is with the Python interactive mode. It does not have full unicode support, so uŽabovitá zmiešaná kaša is changed to u'\x8eabovit\xe1 zmie\x9aan\xe1 ka\x9aa'. If you call your code from another program, it might work correctly. -- André Engels,

Re: unicode issue

2009-09-30 Thread gentlestone
On 30. Sep., 10:35 h., Andre Engels andreeng...@gmail.com wrote: I get the feeling that the problem is with the Python interactive mode. It does not have full unicode support, so uŽabovitá zmiešaná kaša is changed to u'\x8eabovit\xe1 zmie\x9aan\xe1 ka\x9aa'. If you call your code from another

Re: unicode issue

2009-09-30 Thread gentlestone
On 30. Sep., 10:43 h., gentlestone tibor.b...@hotmail.com wrote: On 30. Sep., 10:35 h., Andre Engels andreeng...@gmail.com wrote: I get the feeling that the problem is with the Python interactive mode. It does not have full unicode support, so uŽabovitá zmiešaná kaša is changed to

Re: unicode issue

2009-09-30 Thread Dave Angel
gentlestone wrote: Why don't work this code on Python 2.6? Or how can I do this job? _MAP = # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C', u'È': 'E', u'É': 'E', u'Ê': 'E', u'Ë': 'E', u'Ì': 'I', u'Í': 'I', u'Î': 'I', u'Ï': 'I',

Re: unicode issue

2009-09-30 Thread gentlestone
On 30. Sep., 11:45 h., Dave Angel da...@dejaviewphoto.com wrote: gentlestone wrote: Why don't work this code on Python 2.6? Or how can I do this job? _MAP =     # LATIN     u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C',     u'È': 'E', u'É':

Re: unicode issue

2009-09-30 Thread saeed.gnu
I recommend to use UTF-8 coding(specially in GNU/Linux) then write this in the second line: #-*- coding: latin-1 -*- -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode issue

2009-09-30 Thread Mark Tolonen
Dave Angel da...@dejaviewphoto.com wrote in message news:4ac328d4.3060...@dejaviewphoto.com... gentlestone wrote: Why don't work this code on Python 2.6? Or how can I do this job? _MAP = # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C',

Re: unicode issue

2009-09-30 Thread Piet van Oostrum
Dave Angel da...@dejaviewphoto.com (DA) wrote: DA Works for me: DA rrr = downcode(uŽabovitá zmiešaná kaša) DA print repr(rrr) DA print rrr DA prints out: DA u'Zabovita zmiesana kasa' DA Zabovita zmiesana kasa DA I did have to add an encoding declaration as line 2 of the file: DA #-*-

Re: unicode issue

2009-09-30 Thread Dave Angel
Piet van Oostrum wrote: Dave Angel da...@dejaviewphoto.com (DA) wrote: DA Works for me: DA rrr = downcode(uŽabovitá zmiešaná kaša) DA print repr(rrr) DA print rrr DA prints out: DA u'Zabovita zmiesana kasa' DA Zabovita zmiesana kasa

Re: unicode issue

2009-09-30 Thread Piet van Oostrum
Dave Angel da...@ieee.org (DA) wrote: [snip] DA Thanks for the correction. What I meant by works for me is that the DA single example in the docstring translated okay. But I do have a lot to DA learn about using Unicode in sources, and I want to learn. DA So tell me, how were we supposed to

Re: unicode issue

2009-09-30 Thread Dave Angel
Piet van Oostrum wrote: Dave Angel da...@ieee.org (DA) wrote: [snip] DA Thanks for the correction. What I meant by works for me is that the DA single example in the docstring translated okay. But I do have a lot to DA learn about using Unicode in sources, and I want to learn.

[issue6077] Unicode issue with tempfile on Windows

2009-05-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: File descriptors wrapped by the new IO module should be opened in binary mode. The attached patch changes TemporaryFile and NamedTemporaryFile to always call os.open() in binary mode; the mode is really used by the io.open() function.

[issue6077] Unicode issue with tempfile on Windows

2009-05-26 Thread Ugra Dániel
built-in open with the same parameters (plus a file name of course) everything works as expected. On Linux this issue does not exists. -- components: Library (Lib) files: UnicodeTest.py messages: 88151 nosy: daniel.ugra severity: normal status: open title: Unicode issue with tempfile

[issue6077] Unicode issue with tempfile on Windows

2009-05-21 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6077 ___ ___ Python-bugs-list

Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this ð. Please help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Albert Hopkins
On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this ð. Please help! You

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org wrote: On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 2:50 PM, jeffg jeffgem...@gmail.com wrote: On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org wrote: On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error.

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Karen Tracey
On Wed, Feb 11, 2009 at 2:50 PM, jeffg jeffgem...@gmail.com wrote: On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org wrote: On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error.

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Martin v. Löwis
Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this ð. Please help! Well, your terminal just cannot display this

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 3:57 PM, Martin v. Löwis mar...@v.loewis.dewrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 4:10 PM, Benjamin Kaplan benjamin.kap...@case.eduwrote: On Wed, Feb 11, 2009 at 3:57 PM, Martin v. Löwis mar...@v.loewis.dewrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and

  1   2   >