Yes, I agree.

With some cleanups as such, the gist of Elias's post would make a worthwhile
addition to the utf-8 faq, imo. Also, if it could somehow be added to the ncurses
manpage that would be a good place too...

If you want to use UTF-8, you're pretty much done! Just work with the
UTF-8 strings just like any other string. Just remember to use wcslen()
instead of strlen() if you want the number of characters. This is
particularily important when doing formatting for a curses app.
    

For screen layout purposes, don't you really want to use wcswidth()
instead of wcslen()? The former gives you the number of character cells
that a string will move the cursor forward on a typical UTF-8 terminal,
the latter gives you merely the number of characters, each of which may
consume 0, 1, or 2 character cells.
  




--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to