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

Fix: display Unicode characters in the table of content (#320) #323

Closed
wants to merge 1 commit into from
Closed

Fix: display Unicode characters in the table of content (#320) #323

wants to merge 1 commit into from

Conversation

lcomrade
Copy link

I was able to fix issue #320. Now Hebrew and Russian characters are displayed correctly.

@lcomrade lcomrade requested a review from Lucas-C as a code owner January 20, 2022 13:33
@lcomrade
Copy link
Author

I run the tests locally:

FAILED test/test_links.py::test_link_alt_text - AssertionError: e35d13f61f2508935ed28c4f17c01308 != 1eb8548fdabde9744bd2f2d22be60143
FAILED test/test_perfs.py::test_intense_image_rendering - Failed: Timeout >40.0s
FAILED test/test_set_date.py::test_setting_old_date - AssertionError: 9a4581eb70460cc4e3dac566650f8152 != 874a8f06bf353ccf49c2e8f5a5d9c704
FAILED test/test_structure_tree.py::test_single_image_structure_tree - AssertionError: assert ('3 0 obj\n'\n '<<\n'\n '/K [4 0 R]\n'\n '/ParentTree 5 0 R\n'\n '/Type /StructTreeRoot\n'\n '...
FAILED test/html/test_html.py::test_html_features - AssertionError: e9d113317a4112d2e25a7387442170b4 != c8e1c7017dbab4a53141d79c4a3b6b42
FAILED test/html/test_html.py::test_html_heading_hebrew - AssertionError: 4bb0f88ef62e47ec61b9e9cf5c504a68 != 8dbdf537d53993450ee9e1e3c831c63e
FAILED test/html/test_html.py::test_html_headings_line_height - AssertionError: 3bec2700217b959be40781b187b4ba79 != d74d76b0e48b306a4c65beb1401a64e1
FAILED test/html/test_html.py::test_html_custom_heading_sizes - AssertionError: 70328b894c059d12f45c31482987a875 != 28f46aa9cc36298809dcfaebd7c20eab
FAILED test/image/alt_text/test_image_alt_text.py::test_alt_text_and_title - AssertionError: 31b52ea25e3ab13ce8b1e9937d6bde44 != fba24ed03fee81813fc7a906a32c6167
FAILED test/image/alt_text/test_image_alt_text.py::test_alt_text_on_two_pages - AssertionError: e06501ca3b56f887e1bb048a299a2df4 != 2e45f6fa060040b672a23afe9880a891
FAILED test/image/image_types/test_insert_images.py::test_insert_jpg_jpxdecode - OSError: encoder jpeg2k not available
FAILED test/image/image_types/test_insert_images.py::test_insert_pillow - AssertionError: f05492ce6debcc275f8563ee814fdc75 != 93b12c307bcd2e5deaf4c69a49679e20
FAILED test/image/image_types/test_insert_images.py::test_insert_bytesio - AssertionError: f05492ce6debcc275f8563ee814fdc75 != 93b12c307bcd2e5deaf4c69a49679e20
FAILED test/outline/test_outline.py::test_simple_outline - AssertionError: 501e3dd5db52ffb3dd02d5b2ffdb408a != 86191c87a72bd290b5a90a6c89b2b106
FAILED test/outline/test_outline.py::test_2_pages_outline - AssertionError: c1e6bf1b3744eebb5b8bd4440f60651e != b2371f799db2b9bcf01d62fe83886cbe
FAILED test/outline/test_outline_html.py::test_html_toc - AssertionError: d109bc05621486b1c7f43198444e4a77 != 17e6fb060a5927b4d11afa3f52f585e7
FAILED test/outline/test_outline_html.py::test_html_toc_2_pages - AssertionError: 218cf9601a299527c56d294b0ac08a24 != 8a4c5359c74d0700ea470236dfddd3ec
FAILED test/outline/test_outline_html.py::test_html_toc_with_h1_as_2nd_heading - AssertionError: 0b605704143c04459c49b17d05823600 != 0e51a5f8ce4217d12784a0322df491c0
FAILED test/outline/test_outline_html.py::test_custom_HTML2FPDF - AssertionError: 5c669aa233acdfb49e83fd07fc967724 != 3f86127217813d5a2e39deb2154e851e
FAILED test/outline/test_outline_serializer.py::test_serialize_outline - AssertionError: assert ('6 0 obj\n'\n '<<\n'\n '/Count 2\n'\n '/First 7 0 R\n'\n '/Last 9 0 R\n'\n '/Type /Outlines...
FAILED test/outline/test_outline_serializer.py::test_serialize_outline_with_headless_hierarchy - AssertionError: assert ('6 0 obj\n'\n '<<\n'\n '/Count 2\n'\n '/First 7 0 R\n'\n '/Last 9 0...
=================================================================== 21 failed, 795 passed, 11 warnings in 78.88s (0:01:18) ====================================================================

For some reason, more tests were failed locally than in GitHub Actions. But most of the failures seem to be caused by a mismatch of hash sums of files. This is because I changed the encoding and new characters appeared in the documents.

@Lucas-C
Copy link
Member

Lucas-C commented Jan 20, 2022

Thank you for submitting this @lcomrade!

I was working on a PR myself here: #324

I regenerated all the relevant PDF test reference files as part of this PR

@Lucas-C
Copy link
Member

Lucas-C commented Jan 20, 2022

@all-contributors please add @lcomrade for code

Now closing this in favour of #324

@allcontributors
Copy link

@Lucas-C

I've put up a pull request to add @lcomrade! 🎉

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

Successfully merging this pull request may close these issues.

2 participants