[unicode] Use the UTF8Decoder to scan const char *

This commit is contained in:
Léa Saviot
2019-01-16 17:03:30 +01:00
committed by Émilie Feral
parent 65e5adafac
commit 41afa92f10
14 changed files with 189 additions and 65 deletions

View File

@@ -9,6 +9,7 @@
#include <assert.h>
#include <poincare/matrix_layout.h>
#include <poincare/layout_helper.h>
#include <kandinsky/unicode/utf8_decoder.h>
using namespace Poincare;
using namespace Shared;
@@ -199,7 +200,7 @@ bool VariableBoxController::selectLeaf(int selectedRow) {
assert(nameLength < nameToHandleMaxSize);
nameToHandle[nameLength++] = '(';
assert(nameLength < nameToHandleMaxSize);
// TODO LEA nameToHandle[nameLength++] = Ion::Charset::Empty;
nameLength+= UTF8Decoder::CodePointToChars(KDCodePointEmpty, nameToHandle+nameLength, nameToHandleMaxSize - nameLength);
assert(nameLength < nameToHandleMaxSize);
nameToHandle[nameLength++] = ')';
assert(nameLength < nameToHandleMaxSize);