Add String::ascii creator functions, to parse a char buffer as ASCII.
The function will log errors if any characters above value 127 are found.
This commit is contained in:
@ -383,14 +383,16 @@ void PListNode::store_text(String &p_stream, uint8_t p_indent) const {
|
||||
p_stream += String("\t").repeat(p_indent);
|
||||
p_stream += "<data>\n";
|
||||
p_stream += String("\t").repeat(p_indent);
|
||||
p_stream += String(data_string.get_data()) + "\n";
|
||||
// Data should be Base64 (i.e. ASCII only).
|
||||
p_stream += String::ascii(data_string) + "\n";
|
||||
p_stream += String("\t").repeat(p_indent);
|
||||
p_stream += "</data>\n";
|
||||
} break;
|
||||
case PList::PLNodeType::PL_NODE_TYPE_DATE: {
|
||||
p_stream += String("\t").repeat(p_indent);
|
||||
p_stream += "<date>";
|
||||
p_stream += String(data_string.get_data());
|
||||
// Data should be ISO 8601 (i.e. ASCII only).
|
||||
p_stream += String::ascii(data_string);
|
||||
p_stream += "</date>\n";
|
||||
} break;
|
||||
case PList::PLNodeType::PL_NODE_TYPE_STRING: {
|
||||
|
||||
Reference in New Issue
Block a user