MicroTeX
MicroTeX copied to clipboard
Make a template version of the latex parser that doesn't use `wchar_t`
Hi. Most LaTeX is not possible to use as UTF-16, so the wchar_t
support seems mostly to be needed for the internationalisation support, and not LaTeX.
As it stands, it may be worth exploring a code path that doesn't rely on wchar_t
and instead directly uses UTF-8 strings. In my case, this would significantly reduce the memory footprint, (embedded systems need to be miserly with the RAM), so I was wondering if you'd accept a PR that did that?
so I was wondering if you'd accept a PR that did that?
Yes, your PR is very welcome. I'm planning to replace the std::wstring
with the plain old UTF-8 strings
. Because the parser needs to iterate over the string to get the Unicode codepoint of the character, I've followed the most intuitive and easy way :sweat_smile: .
There's no wchar_t
anymore, please take a look at the branch openmath.