Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44910
| Date | 2013-05-07 23:21 +0100 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: Making safe file names |
| References | <51895D03.4000300@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1423.1367965284.3114.python-list@python.org> (permalink) |
On 07/05/2013 20:58, Andrew Berg wrote: > Currently, I keep Last.fm artist data caches to avoid unnecessary API calls and have been naming the files using the artist name. However, > artist names can have characters that are not allowed in file names for most file systems (e.g., C/A/T has forward slashes). Are there any > recommended strategies for naming such files while avoiding conflicts (I wouldn't want to run into problems for an artist named C-A-T or > CAT, for example)? I'd like to make the files easily identifiable, and there really are no limits on what characters can be in an artist name. > Conflicts won't occur if: 1. All of the characters of the artist's name are mapped to an encoding. 2. Different characters map to different encodings. 3. No encoding is a prefix of another encoding. In practice, you'll be mapping most characters to themselves.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Making safe file names MRAB <python@mrabarnett.plus.com> - 2013-05-07 23:21 +0100
csiph-web