Difference between revisions of "File URI I18N"
From Offset
Jump to navigationJump to searchm (+category) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== File URI Internationalization (and character mapping) == | == File URI Internationalization (and character mapping) == | ||
− | + | Sometimes, it is desirable to take a web of material and move | |
− | it to the local file system. This works OK | + | it to the local file system. This works OK sometimes, but there |
are problems when the original web (whether from HTTP or | are problems when the original web (whether from HTTP or | ||
a file system) contains characters that are not allowed | a file system) contains characters that are not allowed | ||
or supported in the local file system. | or supported in the local file system. | ||
− | There is a two-way mapping between file: URIs and | + | There is a two-way mapping between file: URIs and OS paths. |
− | For URI -> | + | For URI -> OS path, the mapping should attempt to map |
− | URI characters into | + | URI characters into OS path characters, if they are allowed. |
If not, then a file system encoding may be necessary. | If not, then a file system encoding may be necessary. | ||
(If the file system has limited capabilities, then | (If the file system has limited capabilities, then | ||
the translation may fail; I don't know any way around | the translation may fail; I don't know any way around | ||
− | + | that.) | |
− | For | + | For OS path -> URI, it is important to reverse the |
transformation. | transformation. | ||
+ | |||
+ | [[Category:URI]] |
Latest revision as of 21:52, 28 May 2013
File URI Internationalization (and character mapping)
Sometimes, it is desirable to take a web of material and move it to the local file system. This works OK sometimes, but there are problems when the original web (whether from HTTP or a file system) contains characters that are not allowed or supported in the local file system.
There is a two-way mapping between file: URIs and OS paths.
For URI -> OS path, the mapping should attempt to map URI characters into OS path characters, if they are allowed. If not, then a file system encoding may be necessary.
(If the file system has limited capabilities, then the translation may fail; I don't know any way around that.)
For OS path -> URI, it is important to reverse the transformation.