MartinPacker / md2pptx

Markdown To PowerPoint converter
MIT License
226 stars 36 forks source link

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

Closed dariovasconcelos closed 3 months ago

dariovasconcelos commented 4 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 4 months 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 4 months 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 4 months ago

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

chutianshu1981 commented 3 months 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 3 months ago

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

MartinPacker commented 3 months 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 3 months ago

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

MartinPacker commented 3 months ago

Closing. Feel free to reopen.