![]() |
#16 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
|
![]() |
![]() |
![]() |
#17 |
Chocolate Grasshopper ...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,599
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 819
Karma: 171672846
Join Date: Jan 2009
Location: Alberta, Canada
Device: PRS-350, PRS-650, iPhone 6, NVIDIA Shield K1
|
Quote:
|
|
![]() |
![]() |
![]() |
#19 |
Chocolate Grasshopper ...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,599
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
If you like the "u" in colour etc., then what's wrong with "z" ?
|
![]() |
![]() |
![]() |
#20 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,244
Karma: 3439432
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
|
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,451
Karma: 1550000
Join Date: Sep 2008
Location: Maryland, USA
Device: Nook Simple Touch, HPC Evo 4G LTE
|
Assuming the "'" are all coded using the same character, as they would be in a text file like the ones you might get from Project Gutenberg (and likely the epubs and stuff derived from PG), the following perl script will work. Just cut and paste it into a file.
#! /usr/bin/perl # --- REPLACE the above line with the path to perl on your system (unless windows). if ($#ARGV != 0) { print "USAGE replace_single.pl <infile>\n"; die; } my ($infile) = @ARGV; my (@lines) = `cat $infile`; foreach (@lines) { s/ '/ "/g; s/' /" /g; print "$_"; } If distinct characters are being used, as would probably be the case with a more professionally formatted book, well, I would need to know the encoding of the characters, but that should be even easier. P.S. Oh right... at the moment, this script just prints out to Standard Out. You will probably want the output in a file. On a Mac or Linux system you would run the program like this: replace_single.pl orig_book.txt > new_book.txt (Note the .txt will be replaced with whatever file extension we are dealing with here). -- Bill Last edited by bill_mchale; 10-08-2010 at 10:14 AM. |
![]() |
![]() |
![]() |
#22 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 231
Karma: 928
Join Date: Aug 2010
Device: Kindle 3
|
Quote:
|
|
![]() |
![]() |
![]() |
#23 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,529
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Note that blindly replacin' single quotes can do wrong with some of 'em.
![]() Depending on the book, there might be a lot of the above. |
![]() |
![]() |
![]() |
#24 | ||
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#25 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,451
Karma: 1550000
Join Date: Sep 2008
Location: Maryland, USA
Device: Nook Simple Touch, HPC Evo 4G LTE
|
Quote:
If the writer is going to use devices like that, the issues get a bit more complicated in writing a script... and the script is unlikely to ever be perfect... I could look for punctuation prior to a "'" and that would catch the vast majority of cases. The remaining problem becomes examples where someone decides to "quote" a word or short phrase without punctuation. At that point, we are getting beyond a simple script and probably need some artificial intelligence. -- Bill |
|
![]() |
![]() |
![]() |
#26 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Yes, this is unfortunately one of those seemingly "straightforward" problems that, when you look at them in depth, turn out to be anything but simple! Turning "straight" quotes into "curly" quotes is even more complicated.
|
![]() |
![]() |
![]() |
#27 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 819
Karma: 171672846
Join Date: Jan 2009
Location: Alberta, Canada
Device: PRS-350, PRS-650, iPhone 6, NVIDIA Shield K1
|
My mistake, I grabbed the entire quote. I only wanted to quote "I still don't see the point of going to all the trouble."
I have no problem with "z", (except when other Canadians call them "zee's" not "zeds"...) ![]() |
![]() |
![]() |
![]() |
#28 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 231
Karma: 928
Join Date: Aug 2010
Device: Kindle 3
|
No, straight quotes to curly quotes is easy. What I do is just convert the book to rtf and open it in MS Word. Then find/replace all ' with ' and find/replace all " with ". Word automatically makes them curly. Also, for those who don't know, Calibre now has an option to "curlify" all of the quotes and apostrophes in a book.
|
![]() |
![]() |
![]() |
#29 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
I guess it's to each their own, type of thing...I personally like to see the correct spelling of words in the region I choose. Commonwealth titles being formatted using the correct spelling, quote makes, metric measurements (kilometre instead of kilometer). the commonwealth (well, where I am anyway) is becoming to "Americanised" as it is. (no offense to Americans here). I see to many people in my country spelling words how America spells them. When I read a book, these little things really stand out.
|
![]() |
![]() |
![]() |
#30 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,529
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Of course it's easy, what's hard is to make them curl the right way. It's been a long time since I last used Word, but I've had enough of its "smart" things, turning to uppercase and swapping letters all the time. What does it do with 'em, 'tis and 'ere? Not to mention the Spanish custom of marking multi-paragraph quotes with closing quote marks...
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change single quotes to double quotes | Elfwreck | Workshop | 16 | 04-26-2013 10:06 AM |
Dealing with double quotes " in URL | kinurev | Recipes | 6 | 10-03-2010 09:57 AM |
convert straight quotes to curly quotes | alansplace | Calibre | 3 | 09-25-2010 03:51 PM |
Quotes | novels.books | Astak EZReader | 4 | 10-26-2009 09:56 PM |