Re: Unicode chr(150) en dash

2008-04-18 Thread marexposed
On Thu, 17 Apr 2008 20:57:21 -0700 (PDT) hdante [EMAIL PROTECTED] wrote: Don't use old 8-bit encodings. Use UTF-8. Yes, I'll try. But is a problem when I only want to read, not that I'm trying to write or create the content. To blame I suppose is Microsoft's commercial success. They won't

Re: Unicode chr(150) en dash

2008-04-18 Thread J. Clifford Dyer
On Fri, 2008-04-18 at 10:28 +0100, [EMAIL PROTECTED] wrote: On Thu, 17 Apr 2008 20:57:21 -0700 (PDT) hdante [EMAIL PROTECTED] wrote: Don't use old 8-bit encodings. Use UTF-8. Yes, I'll try. But is a problem when I only want to read, not that I'm trying to write or create the content.

Re: Unicode chr(150) en dash

2008-04-18 Thread J. Clifford Dyer
On Fri, 2008-04-18 at 07:27 -0400, J. Clifford Dyer wrote: On Fri, 2008-04-18 at 10:28 +0100, [EMAIL PROTECTED] wrote: On Thu, 17 Apr 2008 20:57:21 -0700 (PDT) hdante [EMAIL PROTECTED] wrote: Don't use old 8-bit encodings. Use UTF-8. Yes, I'll try. But is a problem when I only

Re: Unicode chr(150) en dash

2008-04-18 Thread John Machin
hdante wrote: The character code in question (which is present in the page), 150, doesn't exist in ISO-8859-1. Are you sure? Consider (re-)reading all of the Wikipedia article. 150 aka \x96 doesn't exist in ISO 8859-1. ISO-8859-1 (two hyphens) is a superset of ISO 8859-1 (one hyphen) and

Re: Unicode chr(150) en dash

2008-04-18 Thread hdante
On Apr 18, 8:36 am, John Machin [EMAIL PROTECTED] wrote: hdante wrote: The character code in question (which is present in the page), 150, doesn't exist in ISO-8859-1. Are you sure? Consider (re-)reading all of the Wikipedia article. 150 aka \x96 doesn't exist in ISO 8859-1. ISO-8859-1

Re: Unicode chr(150) en dash

2008-04-18 Thread Martin v. Löwis
150 aka \x96 doesn't exist in ISO 8859-1. ISO-8859-1 (two hyphens) is a superset of ISO 8859-1 (one hyphen) and adds the not-very-useful-AFAICT control codes \x80 to \x9F. To disambiguate the two, when I want to refer to the one with the control characters, I use the name IANA ISO-8859-1 or

Re: Unicode chr(150) en dash

2008-04-17 Thread marexposed
Thank you Martin and John, for you excellent explanations. I think I understand the unicode basic principles, what confuses me is the usage different applications make out of it. For example, I got that EN DASH out of a web page which states ?xml version=1.0 encoding=ISO-8859-1? at the

Re: Unicode chr(150) en dash

2008-04-17 Thread s0suk3
On Apr 17, 10:10 am, [EMAIL PROTECTED] wrote: Thank you Martin and John, for you excellent explanations. I think I understand the unicode basic principles, what confuses me is the usage different applications make out of it. For example, I got that EN DASH out of a web page which states

Re: Unicode chr(150) en dash

2008-04-17 Thread Richard Brodie
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I think I understand the unicode basic principles, what confuses me is the usage different applications make out of it. For example, I got that EN DASH out of a web page which states ?xml version=1.0 encoding=ISO-8859-1? at the

Re: Unicode chr(150) en dash

2008-04-17 Thread Martin v. Löwis
For example, I got that EN DASH out of a web page which states ?xml version=1.0 encoding=ISO-8859-1? at the beggining. That's why I did go for that encoding. But if the browser can properly decode that character using that encoding, how come other applications can't? Please do trust us that

Re: Unicode chr(150) en dash

2008-04-17 Thread hdante
On Apr 17, 12:10 pm, [EMAIL PROTECTED] wrote: Thank you Martin and John, for you excellent explanations. I think I understand the unicode basic principles, what confuses me is the usage different applications make out of it. For example, I got that EN DASH out of a web page which states

Re: Unicode chr(150) en dash

2008-04-16 Thread Martin v. Löwis
C:\Python24\Lib\site-packages\MySQLdb\cursors.py, line 149, in execute query = query.encode(charset) UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2013' in position 52: ordinal not in range(256) Here it complains that it deals with the character U+2013, which is EN DASH; it

Re: Unicode chr(150) en dash

2008-04-16 Thread John Nagle
[EMAIL PROTECTED] wrote: Hello guys girls I'm pasting an en dash (http://www.fileformat.info/info/unicode/char/2013/index.htm) character into a tkinter widget, expecting it to be properly stored into a MySQL database. I'm getting this error:

Unicode chr(150) en dash

2008-04-15 Thread marexposed
Hello guys girls I'm pasting an en dash (http://www.fileformat.info/info/unicode/char/2013/index.htm) character into a tkinter widget, expecting it to be properly stored into a MySQL database. I'm getting this error: