-
- Downloads
Project 'savoirfairelinux/ring-daemon' was moved to 'savoirfairelinux/jami-daemon'. Please update any links and bookmarks that may still have the old path.
daemon: add utf8_utils to check validity of utf-8 strings
Based on work already existing in glib and dbus, two new functions to validate
and reformat utf-8 strings are added:
* utf8_validate: returns true if the `char` sequence is valid utf-8.
* utf8_make_valid: transforms an invalid utf-8 sequence into a valid one,
by replacing each bad byte by U+FFFD REPLACEMENT CHARACTER. The same
behaviour is implemented in other GNOME applications.
These two new functions are used in sip_utils::parseDisplayName().
Change-Id: Ie9a6c35b4df7883637374c325b05b6cf875f6b12
Signed-off-by:
Pascal Potvin <pascal.potvin@extenway.com>
Showing
- daemon/src/Makefile.am 2 additions, 0 deletionsdaemon/src/Makefile.am
- daemon/src/sip/sip_utils.cpp 4 additions, 12 deletionsdaemon/src/sip/sip_utils.cpp
- daemon/src/utf8_utils.cpp 304 additions, 0 deletionsdaemon/src/utf8_utils.cpp
- daemon/src/utf8_utils.h 69 additions, 0 deletionsdaemon/src/utf8_utils.h
- daemon/test/siptest.cpp 2 additions, 1 deletiondaemon/test/siptest.cpp
Loading
Please register or sign in to comment