MartinPacker / md2pptx

Markdown To PowerPoint converter
MIT License
206 stars 31 forks source link

Latin character í (Latin small letter i with acute) is displayed with errors #161

Closed dariovasconcelos closed 1 month ago

dariovasconcelos commented 2 months ago

All accentuated characters work correctly with the exception of "í", which generates a ">" on the final PPT CleanShot 2024-07-03 at 11 33 44@2x

MartinPacker commented 1 month ago

I think I might've fixed this. This is similar to the Danish character problem I encountered.

Can you try 5.0.1 - when I release it in a few minutes - and see if the problem is still there?

Technical explanation: I was using high 8-bit chars as tokens. Now I'm using "guaranteed unused" high 16-bit Unicode codepoints instead.

Thanks!

(And sorry for taking a few days to notice your Issue.)

dariovasconcelos commented 1 month ago

Thanks! But it's giving me the same problem :(

This is my output:

md2pptx Markdown To Powerpoint Converter 5.0.1 14 July, 2024

Open source project: https://github.com/MartinPacker/md2pptx

External Dependencies:

Python: 3.11.4 python-pptx: 0.6.23 Pillow: 10.4.0 CairoSVG: Not Installed graphviz: Not Installed

Internal Dependencies:

funnel: 0.1 runPython: 0.2


My file is UTF-8 with Unicode: ReporteAssessment.md: Unicode text, UTF-8 text

The strange thing about this issue is that most accentuated characters work, only í doesn't

Thanks again!

MartinPacker commented 1 month ago

Thank you. Do you have a Unicode code point for it. That will help me investigate.

chutianshu1981 commented 1 month ago

I also encountered the conversion error problem when using Simplified Chinese. I solved the problem by changing the 4924th line of code in md2pptx with input_path.open(mode='r', encoding='utf-8') as file:

MartinPacker commented 1 month ago

Thank you. We will need to test such a change extensively - to make sure it doesn't muck anything else up.

MartinPacker commented 1 month ago

So, I've run this through 2 (not terribly challenging) presentations and it works.

So please test with the commit I just made (5.0.1+ 25 July when you run it.)

MartinPacker commented 1 month ago

Shipped in v5.0.2. Keeping this open for a while - in case there are regressions.

MartinPacker commented 1 month ago

Closing. Feel free to reopen.