-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add Unicode text support #2
Comments
At the moment, it can only handle reading ascii text files. To work around the limitation, you could pipe your text through iconv with In the future to support those characters, I'll need to find/write a unicode string class along with a unicode supported regex library. |
Thanks, I'll have a look at it. |
Here's a quick update on my progress so far. I wasn't too familiar with how Unicode worked, but after doing some reading and research the past few days, I think I have a good, general understanding of it now. To properly support displaying, aligning, and correctly highlighting Unicode text, it appears the program needs a way to iterate over the user-perceived characters, known as grapheme clusters. I played around with the above linked library, tinyutf8, which allowed to iterate and get the size of a string in Unicode code points. It doesn't seem to have the capability to iterate over grapheme clusters at the moment. Since a grapheme cluster can be represented by multiple Unicode code points, it doesn't seem like the appropriate solution for what's needed. Following that, I checked out Boost.Locale using the icu backend. Its api I'm trying out another option today using the Lastly, I've been tinkering with the Boost.Regex library using the In conclusion, Fltrdr will have Unicode text support soon! |
As of Version 0.2.0, Fltrdr supports UTF-8 Unicode text! UTF-8 text should now render properly, including full-width CJK Unified Ideographs. I ended up using the If you get the chance to try it out, please let me know if you have any suggestions or encounter any issues :) |
It works for me, that is fantastic. Thank you. |
Using Linux, I tried in different terminal emulators and all the accented characters I tested (
éèàçôîû
) show up wrong.The text was updated successfully, but these errors were encountered: