Cleanup: use UTF8 string functions in source/blender/python

Use UTF8 aware functions unless raw bytes are expected.
This commit is contained in:
Campbell Barton
2025-07-27 02:47:45 +00:00
parent 83a489d9ac
commit 9f056204e5
10 changed files with 52 additions and 54 deletions

View File

@@ -22,7 +22,7 @@
#ifndef MATH_STANDALONE
# include "BLI_dynstr.h"
# include "BLI_string.h"
# include "BLI_string_utf8.h"
#endif
enum eMatrixAccess_t {
@@ -2358,7 +2358,7 @@ static PyObject *Matrix_str(MatrixObject *self)
for (col = 0; col < self->col_num; col++) {
maxsize[col] = 0;
for (row = 0; row < self->row_num; row++) {
const int size = SNPRINTF_RLEN(dummy_buf, "%.4f", MATRIX_ITEM(self, row, col));
const int size = SNPRINTF_UTF8_RLEN(dummy_buf, "%.4f", MATRIX_ITEM(self, row, col));
maxsize[col] = max_ii(maxsize[col], size);
}
}