Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 10-13-2013, 11:10 PM   #1
abuck
Member
abuck began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2013
Device: playbook
Save to disk, characters getting replaced by _

I have some title with '+' characters in it and when I save to disk, It's getting converted to underscore _. I'm not sure why it can't save as '+' characters and need to convert any occurance of '+' to '_'.

Is there any reason for this ? Can I remove this convertion, I would like to have '+' instead of '_' in my pdf filename.

An example would be: C++ for dummy.
abuck is offline   Reply With Quote
Old 10-13-2013, 11:31 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,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by abuck View Post
I have some title with '+' characters in it and when I save to disk, It's getting converted to underscore _. I'm not sure why it can't save as '+' characters and need to convert any occurance of '+' to '_'.

Is there any reason for this ? Can I remove this convertion, I would like to have '+' instead of '_' in my pdf filename.

An example would be: C++ for dummy.
Plus is concatenate files in windows/DOS
filea+fileb+filec
theducks is online now   Reply With Quote
Old 10-14-2013, 12:17 AM   #3
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,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
Plus is concatenate files in windows/DOS
filea+fileb+filec
So what, I have dozens of files and folders with '++' in their names - I use it to give me a hint that said file or folder contains something extra than the name might otherwise indicate.

See Naming Files, Paths, and Namespaces

Quote:
Use any character in the current code page for a name, including Unicode characters and characters in the extended character set (128–255), except for the following:

The following reserved characters:

< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

Integer value zero, sometimes referred to as the ASCII NUL character.

Characters whose integer representations are in the range from 1 through 31, except for alternate data streams where these characters are allowed. For more information about file streams, see File Streams.

Any other character that the target file system does not allow.
I don't use the '++' hint in calibre because I can put a note into My Comments column and spell out what the extras actually are.

ETA : Are calibre's file naming 'rules' concisely documented anywhere - including which are platform specific and which are global. I looked in the manual but couldn't see anything.

BR

Last edited by BetterRed; 10-14-2013 at 01:42 AM.
BetterRed is offline   Reply With Quote
Old 10-14-2013, 12:28 AM   #4
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, you cannot. The list of filtered out characters is designed to be robust across *all* currently used operating systems, kernels and file systems.
kovidgoyal is offline   Reply With Quote
Old 10-07-2014, 10:07 PM   #5
abuck
Member
abuck began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2013
Device: playbook
Is there any file I could change (python) or any hack to bypass this ? It's stripping off my . in the filename and I'm using another program to compare it so I need to make sure the file does not get change.

I'm a programmer so any plugin or any custom stuff I could bypass this auto-rename would be such appreciated.

thanks!
abuck is offline   Reply With Quote
Old 10-07-2014, 11:43 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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Run calibre from source, and change the sanitize_file_name functions in calibre/__init__.py
kovidgoyal is offline   Reply With Quote
Old 10-08-2014, 12:35 AM   #7
abuck
Member
abuck began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2013
Device: playbook
Quote:
Originally Posted by kovidgoyal View Post
Run calibre from source, and change the sanitize_file_name functions in calibre/__init__.py
Wow, can't believe i was able to get it working so quick.

Your solution worked perfectly !

thanks, you made my day
abuck is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Save to disk and special characters GarfieldKlon Library Management 2 11-27-2012 07:48 PM
Save on disk PhM Calibre 1 06-13-2011 12:43 PM
Save to Disk beckywc Library Management 3 06-06-2011 08:54 PM
Save for Later replaced with Wish Lists RobbieClarken Amazon Kindle 0 12-08-2009 12:09 PM
Can't SAVE TO DISK Calibre 0.6.24 Rootman Calibre 5 12-06-2009 05:01 AM


All times are GMT -4. The time now is 04:34 PM.


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