Apparently remarkable uses \u2028 and \u2029 as their line separators in some text blocks. This seems to break the svg exporter when trying to append the html output.
File "D:\Work\remarkable\tests\Lines2InkML\venv\Lib\site-packages\rmc\cli.py", line 137, in convert_rm
tree_to_svg(tree, fout)
File "D:\Work\remarkable\tests\Lines2InkML\venv\Lib\site-packages\rmc\exporters\svg.py", line 103, in tree_to_svg
draw_text(tree.root_text, output)
File "D:\Work\remarkable\tests\Lines2InkML\venv\Lib\site-packages\rmc\exporters\svg.py", line 291, in draw_text
output.write(f'\t\t\t<text x="{xx(xpos)}" y="{yy(ypos)}" class="{cls}">{str(p).strip()}</text>\n')
File "C:\Python312\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Quick fix
I am bypassing this error in my forked version by just doing this:
# Translate unsupported unicode chars
content = str(p).replace('\u2028', '<br>').replace('\u2029', '<br>')
But maybe there should be a function that handles and parses correctly all special Unicode characters.
Apparently remarkable uses \u2028 and \u2029 as their line separators in some text blocks. This seems to break the svg exporter when trying to append the html output.
Quick fix
I am bypassing this error in my forked version by just doing this:
But maybe there should be a function that handles and parses correctly all special Unicode characters.