469,275 Members | 1,802 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Fail codecs.lookup() on 'mbcs' and 'tactis'

$ python
Python 2.4.1 (#1, May 16 2005, 15:19:29)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import codecs
codecs.lookup('ascii') (<built-in function ascii_encode>, <built-in function ascii_decode>,
<class encodings.ascii.StreamReader at 0xb7f1302c>, <class
encodings.ascii.StreamWriter at 0xb7f82fbc>) codecs.lookup('mbcs') Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/encodings/__init__.py", line 96, in
search_function
globals(), locals(), _import_tail)
File "/usr/lib/python2.4/encodings/mbcs.py", line 14, in ?
class Codec(codecs.Codec):
File "/usr/lib/python2.4/encodings/mbcs.py", line 18, in Codec
encode = codecs.mbcs_encode
AttributeError: 'module' object has no attribute 'mbcs_encode' codecs.lookup('tactis')

Traceback (most recent call last):
File "<stdin>", line 1, in ?
LookupError: unknown encoding: tactis
Aug 4 '05 #1
3 1731
I don't know what 'tactis' is, but 'mbcs' is not a portable character set name.
It's a special character set name on win32, which refers to some system-specific
multibyte character set.

I don't think these "failures" are a Python bug.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFC8itgJd01MZaTXX0RAsCXAJ9putcYKQmJh0JtEpz3t5 5ZJUw8WgCeNeVo
45dOp2LG6mfqQ2jw+4yHUoQ=
=JqsK
-----END PGP SIGNATURE-----

Aug 4 '05 #2

<je****@unpythonic.net> wrote in message
news:ma***************************************@pyt hon.org...
I don't know what 'tactis' is, but 'mbcs' is not a portable character set name.
It's a special character set name on win32, which refers to some system-specific
multibyte character set.

I don't think these "failures" are a Python bug.


I suppose, for consistency, it should ideally raise LookupError, though
Aug 4 '05 #3
On Thu, Aug 04, 2005 at 03:59:01PM +0100, Richard Brodie wrote:
I suppose, for consistency, it should ideally raise LookupError, though


Maybe so. If that was the poster's point, then I completely missed it.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFC8kXcJd01MZaTXX0RAq23AJ9jjXX2kqSUtxdm6JagR5 o6Av8duQCeOEbD
5mK5Ynnx4M8E21sDpHUfLVA=
=/iJo
-----END PGP SIGNATURE-----

Aug 4 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Edward K. Ream | last post: by
8 posts views Thread by Marko Faldix | last post: by
2 posts views Thread by Fortepianissimo | last post: by
3 posts views Thread by Ivan Van Laningham | last post: by
1 post views Thread by TK | last post: by
7 posts views Thread by Mike Currie | last post: by
4 posts views Thread by Bit Byte | last post: by
reply views Thread by yrogirg | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.