Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
liturgist mannequin opened this issue Aug 4, 2005 · 10 comments
Closed

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

liturgist mannequin opened this issue Aug 4, 2005 · 10 comments
Assignees
Labels
docs Documentation in the Doc dir topic-unicode type-feature A feature request or enhancement

Comments

@liturgist
Copy link
Mannequin

liturgist mannequin commented Aug 4, 2005

BPO 1251921
Nosy @malemburg, @loewis, @vstinner, @devdanzin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/malemburg'
closed_at = <Date 2009-02-16.20:02:29.380>
created_at = <Date 2005-08-04.14:11:16.000>
labels = ['type-feature', 'expert-unicode', 'docs']
title = "Fail codecs.lookup() on 'mbcs' and 'tactis'"
updated_at = <Date 2009-02-16.20:02:29.378>
user = 'https://bugs.python.org/liturgist'

bugs.python.org fields:

activity = <Date 2009-02-16.20:02:29.378>
actor = 'vstinner'
assignee = 'lemburg'
closed = True
closed_date = <Date 2009-02-16.20:02:29.380>
closer = 'vstinner'
components = ['Documentation', 'Unicode']
creation = <Date 2005-08-04.14:11:16.000>
creator = 'liturgist'
dependencies = []
files = []
hgrepos = []
issue_num = 1251921
keywords = []
message_count = 10.0
messages = ['25983', '25984', '25985', '25986', '25987', '25988', '25989', '25990', '82196', '82267']
nosy_count = 5.0
nosy_names = ['lemburg', 'loewis', 'liturgist', 'vstinner', 'ajaksu2']
pr_nums = []
priority = 'normal'
resolution = 'rejected'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1251921'
versions = ['Python 2.4']

@liturgist
Copy link
Mannequin Author

liturgist mannequin commented Aug 4, 2005

$ 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

@liturgist liturgist mannequin assigned malemburg Aug 4, 2005
@liturgist liturgist mannequin added the topic-unicode label Aug 4, 2005
@liturgist liturgist mannequin assigned malemburg Aug 4, 2005
@liturgist liturgist mannequin added the topic-unicode label Aug 4, 2005
@malemburg
Copy link
Member

Logged In: YES
user_id=38388

mbcs is only available on Windows.

I'm not sure what happened to the tactis codec - it's
possible that it never got checked in.

Do you have a reference for the tactis encoding ?

@liturgist
Copy link
Mannequin Author

liturgist mannequin commented Aug 4, 2005

Logged In: YES
user_id=197677

UTF-8 is an MBCS encoding in that is is a "multiple byte
character set", right? :-) UTF-16 is an MSCS; multiple
short character set.

There appears to have been some discussion on 'tactis' and
'tactis260' earlier in bug 854511.

http://mail.python.org/pipermail/python-bugs-list/2003-December/021394.html

@liturgist
Copy link
Mannequin Author

liturgist mannequin commented Aug 4, 2005

Logged In: YES
user_id=197677

If 'mbcs' is Windows-only, then why does it appear in the
list of registered codecs in encodings.aliases.aliases on
the Linux platform? Shouldn't it not be registered on other
platforms?

@loewis
Copy link
Mannequin

loewis mannequin commented Aug 6, 2005

Logged In: YES
user_id=21627

Yes, UTF-8 is a multi-byte character set, but no, UTF-8 and
mbcs are not synonyms. See

http://docs.python.org/lib/standard-encodings.html

for the documentation. encodings.aliases.aliases is no
registration - it is an alias databse. So if somebody refers
to "dbcs", this will be aliased to "mbcs". That does not
mean "mbcs" needs to be supported - it only means "dbcs" is
not supported on Linux, either.

tactis was never part of a Python release, so its lack is
not a bug.

Closing this report as invalid.

@malemburg
Copy link
Member

Logged In: YES
user_id=38388

Reopened: this is indeed a bug - the tactis codec is
referenced in the aliases table but was never added to the
encodings package.

Either the codec will have to be added, or the alias entry
removed.

@liturgist
Copy link
Mannequin Author

liturgist mannequin commented Aug 6, 2005

Logged In: YES
user_id=197677

Where is bug 854511 regarding Thai encodings? The URL has
some discussion of this bug on TISI and ISO encodings.

http://mail.python.org/pipermail/python-bugs-list/2003-December/021394.html

@loewis
Copy link
Mannequin

loewis mannequin commented Aug 6, 2005

Logged In: YES
user_id=21627

It's not a bug, it's a feature request, and it's at

http://python.org/sf/854511

I have rejected the request.

@devdanzin
Copy link
Mannequin

devdanzin mannequin commented Feb 16, 2009

The 'tactis' codec is still missing, but it's not mentioned in docs
either: http://docs.python.org/dev/library/codecs.html#id3

I'll close this one soon unless someone voices disagreement.

@devdanzin devdanzin mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Feb 16, 2009
@vstinner
Copy link
Member

It looks like few people need this codec (no message since 2005), so I
close this feature request.

Reopen this issue if you need this codec.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-unicode type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants