unicode-related robustness improvements

* enable ARDUINOJSON_DECODE_UNICODE (otherwise unicode needs 6(!) bytes for encoding)
* robustness: increase a few tiny string buffers for some extra margin
* Web UI: allow entering up to 64 chars as segment name
This commit is contained in:
Frank
2025-11-20 22:36:46 +01:00
parent 2f48f03e44
commit dcdc05b592
4 changed files with 9 additions and 9 deletions

View File

@@ -214,7 +214,7 @@ bool appendObjectToFile(const char* key, JsonDocument* content, uint32_t s, uint
if (!f) return false;
if (f.size() < 3) {
char init[10];
char init[12];
strcpy_P(init, PSTR("{\"0\":{}}"));
f.print(init);
}
@@ -285,7 +285,7 @@ bool appendObjectToFile(const char* key, JsonDocument* content, uint32_t s, uint
bool writeObjectToFileUsingId(const char* file, uint16_t id, JsonDocument* content)
{
char objKey[10];
char objKey[12];
sprintf(objKey, "\"%d\":", id);
return writeObjectToFile(file, objKey, content);
}
@@ -360,7 +360,7 @@ bool writeObjectToFile(const char* file, const char* key, JsonDocument* content)
bool readObjectFromFileUsingId(const char* file, uint16_t id, JsonDocument* dest)
{
char objKey[10];
char objKey[12];
sprintf(objKey, "\"%d\":", id);
return readObjectFromFile(file, objKey, dest);
}