I like C. I love C. It's a great tool for its job. Not for UI, though.
Memory safety
You can't succeed at it just on your own. No one does. You'll need valgrind, address sanitizer, -fanalyzer, _FORTIFY_SOURCE, memory monitors, etc. It's achievable, but not worth the effort in the case of UI.
Strings
Sooner or later, you will need to distinguish between string byte size and string character count. Gee-whiz, they can be different! Take a breath and manage it all together manually, boy.
Sooner or later, you will need to find matches to a regular expression in your string. regex.h will happily help you with that for char. You will have to find the matches for wchar_t yourself, though.