get_best_eci: check UTF-8 before returning 26; move is_valid_utf8 to common

This commit is contained in:
gitlost
2021-03-21 17:35:52 +00:00
parent 7f74414666
commit 2d962c6321
7 changed files with 104 additions and 64 deletions

View File

@ -112,6 +112,7 @@ extern "C" {
INTERNAL int is_composite(const int symbology);
INTERNAL int istwodigits(const unsigned char source[], const int length, const int position);
INTERNAL unsigned int decode_utf8(unsigned int *state, unsigned int *codep, const unsigned char byte);
INTERNAL int is_valid_utf8(const unsigned char source[], const int length);
INTERNAL int utf8_to_unicode(struct zint_symbol *symbol, const unsigned char source[], unsigned int vals[],
int *length, const int disallow_4byte);
INTERNAL void set_minimum_height(struct zint_symbol *symbol, const int min_height);