Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-05-2013, 09:37 PM   #1
flueterflam
Junior Member
flueterflam began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2013
Device: none
Do not want plus sign (+) getting converted to space when saving to disk

I tried finding the answer to this, but mostly found things pertaining to splitting multiple authors. If you happen to know that I missed a post on this, please point me in the right direction!

In the columns and metadata, the authors are being split by ampersands (&). This is all fine and dandy. However, I really hate how they look in the filenames for books/papers. Instead, I generally use the plus sign (+) and no spaces between the authors' last names. Example:

Sakel+Everett_-_Linguistic_Fieldwork_(2012)

I actually have the template set up perfectly in the "Saving books to disk" preferences. Here is what I got:

Code:
{author_sort:'re(re($,"\,.*\&\s?","+"),"\,.*$","")'}
I made a new column with this and the file name looks perfect! However, when I attempt to save to disk with this exact same template, there is some type of processing taking place between this template and the filename being written. What happens is that the plus sign (+) gets replaced with a space (or underscore, if I select the "replace spaces with underscores" option).

I looked around, tried changing various options that seemed even remotely related, and got no results. The plus sign (+) is valid ASCII, and it is also valid for filenames on Windows and Linux (not sure about Mac). So, there is no need to force this to change...

Does anyone know where I can look for an option/regex that is causing this?

Thanks!

Last edited by flueterflam; 01-05-2013 at 09:42 PM. Reason: Added example of filename
flueterflam is offline   Reply With Quote
Old 01-05-2013, 10:32 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,754
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Plus is not always valid in a file name.
It is the symbol for concatenation (adding 2 files together)

Calibre tries to ONLY allow file names that are valid in ALL OS
theducks is offline   Reply With Quote
Old 01-06-2013, 09:33 AM   #3
flueterflam
Junior Member
flueterflam began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2013
Device: none
I'm assuming because you didn't proffer any way to circumvent this, that it's not possible. Anyhow, out of curiosity, which OSes do not allow the plus sign in a file name?
flueterflam is offline   Reply With Quote
Old 01-06-2013, 09:53 AM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,141
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
I think there is a difference between usage in command prompts. vs actual characters allowed in file names.

See http://en.wikipedia.org/wiki/Filename for some reading on the subject.
PeterT is offline   Reply With Quote
Old 01-06-2013, 04:34 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by flueterflam View Post
Anyhow, out of curiosity, which OSes do not allow the plus sign in a file name?
Windows '95, but only on FAT32 devices, I assume later Windows would be the same - disallow it on FAT32 devices only.

IIRC, FAT32 also disallows square brackets.

BR
BetterRed is offline   Reply With Quote
Old 01-06-2013, 11:11 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://en.wikipedia.org/wiki/Filenam...me_limitations
kovidgoyal is offline   Reply With Quote
Old 01-10-2013, 01:25 AM   #7
flueterflam
Junior Member
flueterflam began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2013
Device: none
Ok, I understand why. But Windows 95 is unsupported and very obsolete now. As far as FAT32 devices, don't most OSes also allow the exFAT format also, which does not have this limitation? Furthermore, according to:

http://en.wikipedia.org/wiki/VFAT#VFAT

Non VFAT-enabled operating systems can still access the files under their short file name alias without restrictions, however, the associated long file names may get lost, when files with long file names are copied under non VFAT-aware operating systems.

This seems acceptable to me. The rare time that I might used a USB drive/SD card in an OS which doesn't support "+", it would fall back to the short file name, which could have this restriction retained. It would remove the limitation of disallowing "+", which seems to be allowed in all other file formats and OSes for filenames.
flueterflam is offline   Reply With Quote
Old 01-10-2013, 02:11 PM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
The FAT32 file system (which doesn't allow "+" in a filename) is used by virtually all reading devices.
HarryT is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving to Disk LRC1962 Library Management 1 06-20-2012 07:58 PM
Saving to Disk paulfiera Calibre 3 07-20-2011 10:21 AM
Saving to Disk Template hurricane51 Conversion 2 07-07-2011 01:22 AM
Losing files when saving saving to disk theaccountant Library Management 4 03-10-2011 02:38 PM
Saving to disk htaylor Calibre 2 01-04-2009 08:29 PM


All times are GMT -4. The time now is 03:33 AM.


MobileRead.com is a privately owned, operated and funded community.