Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs translating Unicode Vulgar Fractions #65

Open
jkoshy opened this issue Sep 18, 2020 · 1 comment
Open

Bugs translating Unicode Vulgar Fractions #65

jkoshy opened this issue Sep 18, 2020 · 1 comment

Comments

@jkoshy
Copy link
Contributor

jkoshy commented Sep 18, 2020

% ebookmaker --version
EbookMaker 0.9.7

Processing VULGAR FRACTION ONE HALF

File: fractions.rst ::

.. meta::
   :DC.Title: Unicode Fractions 1

*   ½ (U+00BD, VULGAR FRACTION ONE HALF)

Run ebookmaker:

% ebookmaker --output-dir=/tmp/PG --make txt fractions.rst
% cat /tmp/PG/Unicode\ Fractions\ 1.txt 

  - A1/2 (U+00BD, VULGAR FRACTION ONE HALF)

Please note the extra A generated in front of the 1/2.

Processing VULGAR FRACTION FIVE EIGHTHS

File: fractions.rst:

.. meta::
   :DC.Title: Unicode Fractions 2

*   ⅝ (U+215D, VULGAR FRACTION FIVE EIGHTHS)
*   ½ (U+00BD, VULGAR FRACTION ONE HALF)

Run ebookmaker:

% ebookmaker --output-dir=/tmp/PG --make txt fractions.rst
ERROR:root:unitame: unhandled chars: {~VULGAR FRACTION FIVE EIGHTHS U+215d~}
ERROR:root:unitame: unhandled chars: {~VULGAR FRACTION FIVE EIGHTHS U+215d~}
% cat /tmp/PG/Unicode\ Fractions\ 2.txt

  - {~VULGAR FRACTION FIVE EIGHTHS U+215d~} (U+215D, VULGAR FRACTION
    FIVE EIGHTHS)
  - 1/2 (U+00BD, VULGAR FRACTION ONE HALF)

Apart from the ⅝ character not being handled, the extra A in front of the 1/2 is no longer generated.

@eshellman
Copy link
Collaborator

you might look at Unitame.py and UnitameData.py to see where the ascii-ifier is going wrong. We might also consider just not "taming" the Unicode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants