New submission from Mark Mc Mahon <mtnbikingm...@gmail.com>:

msilib.make_id() currently ensure that any of the following characters are not 
in the resulting ID: " -+~;"

Per the Microsoft documentation the following list of characters are allowed.
http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx
"""The Identifier data type is a text string. Identifiers may contain the
ASCII characters A-Z (a-z), digits, underscores (_), or periods (.). However, 
every identifier must begin with either a letter or an underscore."""

If an file name contains any characters outside of the characters " -+~;" + 
string.ascii_letters + string.digits + "._" then it will be an invalid ID.

This includes many punctuation characters which are valid in file names but not 
ID's, and every unicode character which does not overlap with ASCII.

The attached patch tries to fix this - and it includes tests.

----------
components: Windows
files: msilib.make_id_fix_and_tests2.patch
keywords: patch
messages: 132336
nosy: markm
priority: normal
severity: normal
status: open
title: msilib.make_id() is not safe for non ASCII characters.
versions: Python 3.2
Added file: http://bugs.python.org/file21430/msilib.make_id_fix_and_tests2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11696>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to