You are not logged in Log in Join
You are here: Home » Members » ajung » Proposals » Mapping filenames to Zope object IDs » View Document

Log in
Name

Password

 

Mapping filenames to Zope object IDs

Contact

Andreas Jung, [email protected].

Note

This is a work in progress. Please help by commenting on specific parts of the proposal.

Problem

Zope allows to import objects through FTP or WebDAV. Usually the filename of the object on the client side is used as object ID inside Zope. This works fine when the filenames are using the ASCII character set but leads to problems when filenames contains characters e.g. from the ISO-8859-X character sets. In such a case Zope refuses to import this object. Zope currently only allows ASCII characters, numbers and some other special characters inside an object ID.

Proposed solutions

There are two possible solutions to affect this problem:

1) A filter should convert filenames with characters others than ASCII to a valid object ID e.g. by converting accented characters to their ASCII base form ( "" to "a")

2) We could allow an extended set of characters inside an objectID e.g. depending on the LOCALE settings one could use all characters from string.letters

Risk Factors

  • The filter of approach 1) could produce broken links in other objects that refer to an object with an converted object ID
  • The filter could create dupes when two filenames are converted to the same object ID.
  • Approach 2) would break existing Zope functionality. At least the WebDAV implementation is concerned because WebDAV requires in this case the conversion of object ID to UTF-8.

Open issues

  • What characters should be allowed in object IDs and which not ?

Scope

The scope of this proposal is to discuss how Zope should handle objects with IDs/filenames with non-ASCII characters in a user-friendly and tolerant way.

Deliverables

1) a converter to convert non-ASCII filenames to valid Zope object IDs

2) patches for all relevant parts of Zope that expect object IDs to be ASCII (e.g. object IDs in URLs)