Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-17-2018, 12:03 PM   #1
Hopkins
Enthusiast
Hopkins began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
Non-ASCII File Names

When I open an edit an epub that has a non-ASCII file name (i.e. 副本保存失敗.epub) I cannot save it. I get the following error:

Code:
calibre, version 3.14.0
ERROR: Could not save: Saving of the book failed. Click "Show details" for more information. You can try to save a copy to a different location, via File->Save a copy

Traceback (most recent call last):
  File "site-packages\calibre\gui2\tweak_book\save.py", line 199, in process_save
  File "site-packages\calibre\gui2\tweak_book\save.py", line 211, in do_save
  File "site-packages\calibre\gui2\tweak_book\save.py", line 74, in save_container
  File "site-packages\calibre\utils\filenames.py", line 487, in atomic_rename
error: (123, 'MoveFileEx', 'The filename, directory name, or volume label syntax is incorrect.')
I am only able to save a copy using an ASCII name.

Is there an option in the editor to allow using non-ASCII file names?
Hopkins is offline   Reply With Quote
Old 01-17-2018, 12:34 PM   #2
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can use non-ascii filenames on operating systems other than windows or on utf-8 based windows systems.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-17-2018, 12:58 PM   #3
Hopkins
Enthusiast
Hopkins began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
Right, this is a Windows 10 US Version. It supports non-ASCII names in the file manager. I guess I'm assuming it is a UTF-8 based system.

Some users of the Chinese Conversion plugin in the Calibre editor have:
  1. opened their non-ASCII named EPUB files via the "Open book" menu
  2. made changes to the text
  3. attemped to save (or save a copy) of the book using the same non-ASCII title

They are confused when they get an error since the OS supports non-ASCII file names and the editor successfully opened the non-ASCII named file. I'm currently recommending they do a "Save a copy" using a temporary ASCII name and then rename it back to the desired name. It's a bit of a kludge.
Hopkins is offline   Reply With Quote
Old 01-17-2018, 10:43 PM   #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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Supporting non-ascii filenames does not mean a system is utf-8. Windows has a mess of legacy encodings it uses (google windows code page).
kovidgoyal is offline   Reply With Quote
Old 01-18-2018, 07:46 AM   #5
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This should take care of it: https://github.com/kovidgoyal/calibr...2f7e27e9cb768f
kovidgoyal is offline   Reply With Quote
Advert
Old 01-18-2018, 08:02 AM   #6
Hopkins
Enthusiast
Hopkins began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
Thanks!
Hopkins is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File names in File explorer vvilmos Onyx Boox 5 10-05-2012 07:40 AM
Extended ASCII characters in txt file pshute Conversion 10 02-28-2012 06:57 AM
Mass import of books metadata from an ASCII file: HELP NEEDED LARdT Calibre 4 07-08-2010 04:05 PM
File Names Vulcan Sony Reader 4 01-02-2009 04:03 PM
Ascii file ProDigit Lounge 1 12-25-2008 10:08 PM


All times are GMT -4. The time now is 05:57 AM.


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