]> Kevux Git Server - fll/commit
Bugfix: The print safely functions are not fully UTF-8 aware.
authorKevin Day <thekevinday@gmail.com>
Sat, 13 Nov 2021 16:07:53 +0000 (10:07 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 13 Nov 2021 16:07:53 +0000 (10:07 -0600)
commitac3911ffe3f86b27a6ae7a3b9fe09ae222fea165
treee39dd7a773c39ff7a77f67892b82e31eddcaa7ab
parent8bea8f48c022c70984d76592dbc62048501a1209
Bugfix: The print safely functions are not fully UTF-8 aware.

The f_print_character_safely_get() can only handle a single byte.
This makes it impossible to be UTF-8 aware.

Provide a new function f_print_safely_get() that accepts a string and a max width.
This string is intended to represent a single character, but can be multi-byte based on max width.
This function checks to see if the character is invalid or a control character, in which case it is replaced.
level_0/f_print/c/print.c
level_0/f_print/c/print.h
level_0/f_print/c/print_to.c
level_0/f_print/c/private-print.c
level_0/f_print/c/private-print.h
level_0/f_print/c/private-print_to.c