![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Plugboard: Removing Unicode characters that Kobo can't render
I have this plugboard for "series" in KOBOTOUCHEXTENDED:
Code:
{series:'re_group($,"([^.]+)\.","[[$]]: ")'} ![]() Anyways, I have a fanfic that has some fancy unicode characters for some effect: This is how it appears on the Kobo: I'm guessing there's no real way for the Kobo to deal with this, so is there anything I can do on Calibre side without changing the series? Is there a way to strip out the Unicode without leaving behind the dash and I? ![]() Last edited by ownedbycats; 09-05-2021 at 03:30 PM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,346
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Could you give us the actual source string, not an image of it? And could you give us what you want as the destination string?
A brute force solution would be to use a plugboard that looks for offending series names and returns the desired series name. This isn't too painful if you don't have many of them. EDIT: I wonder what the 'transliterate' formatter function would do with your string ... Last edited by chaley; 09-05-2021 at 05:10 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Assuming it posts correctly on the forum, the characters are ᕼ ᗩ ᒪ ᖴ - ᒪ I ᖴ ᗴ.
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,346
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Well, 'transliterate' doesn't do anything useful. For the string ''ᕼ ᗩ ᒪ ᖴ - ᒪ I ᖴ ᗴ'' it returns 'h po ma we - ma I we ga'.
![]() |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,346
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
A example plugboard template that returns what I think you want follows. It returns a special string if the series matches some value, otherwise it returns the series. If the series is empty it returns the empty string.
Code:
program: s = $series; # s = 'ᕼ ᗩ ᒪ ᖴ - ᒪ I ᖴ ᗴ'; first_non_empty( if s == 'ᕼ ᗩ ᒪ ᖴ - ᒪ I ᖴ ᗴ' then 'Half-life' fi, # add more lines here if needed s ) |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,187
Karma: 1988646
Join Date: Aug 2015
Device: Kindle
|
You can also use user defined template functions to do one of two things:
Notes
Last edited by capink; 09-05-2021 at 04:16 PM. |
![]() |
![]() |
![]() |
#7 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thanks
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
find unicode characters | Sunlite | Editor | 12 | 01-05-2014 07:04 AM |
Support of Special Unicode Characters? | gawl | ePub | 6 | 03-27-2013 02:41 PM |
ePub CSS @fontface Unicode chars render in <td>, not in <div>, other elements | Abelinkin | ePub | 2 | 06-05-2012 04:24 AM |
¿Convert unicode decomposed characters to unique/normal characters? | JohnQwerty | Calibre | 3 | 04-05-2012 12:08 PM |
Non-Roman Unicode Characters | teh603 | Writers' Corner | 7 | 03-26-2012 11:06 AM |