haarcuba / cpp-text-table

C++ text table: format text in tabular form
GNU Lesser General Public License v2.1
143 stars 36 forks source link

UTF8 character support #11

Closed cpp977 closed 4 years ago

cpp977 commented 4 years ago

Is it desirable to support UTF8 characters in the table? Therefore one needs to properly compute the number of glyphs instead of the number of bytes because of mutlibyte glyphs appearing in UTF8 encoding. I would have a patch but it will only work on a linux platform and only for UTF-8 encoded strings. I havent enough time to provide a platform independent implementation. Please tell me if you are interested. If so, I would prepare a pull request.

haarcuba commented 4 years ago

great idea. Perhaps you can make it in a way so that it's supported on linux, but not supported on other platforms?

E.G. if it's linux use a particular character type (class) if not, use the current implementation

cpp977 commented 4 years ago

Yes sure, that is possible. I will also try to design it in a way that the code for different platforms could be added later, if someone needs it.

haarcuba commented 4 years ago

great! thanks!

haarcuba commented 4 years ago

closed by #12