Fix UTF-8 and UTF-16 encoding support usage in Json resources
Closes #310 Closes #27
This commit is contained in:
@@ -81,9 +81,8 @@ void UICanvas::Serialize(SerializeStream& stream, const void* otherObj)
|
||||
else
|
||||
{
|
||||
// Write result data
|
||||
auto length = mono_string_length(invokeResultStr);
|
||||
auto invokeResultChars = mono_string_to_utf8(invokeResultStr);
|
||||
stream.RawValue(invokeResultChars, length);
|
||||
stream.RawValue(invokeResultChars);
|
||||
mono_free(invokeResultChars);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,14 +99,13 @@ void UIControl::Serialize(SerializeStream& stream, const void* otherObj)
|
||||
{
|
||||
stream.JKEY("Control");
|
||||
const auto controlTypeChars = mono_string_to_utf8(controlType);
|
||||
stream.String(controlTypeChars, controlTypeLength);
|
||||
stream.String(controlTypeChars);
|
||||
mono_free(controlTypeChars);
|
||||
}
|
||||
|
||||
stream.JKEY("Data");
|
||||
const auto invokeResultLength = mono_string_length(invokeResultStr);
|
||||
const auto invokeResultChars = mono_string_to_utf8(invokeResultStr);
|
||||
stream.RawValue(invokeResultChars, invokeResultLength);
|
||||
stream.RawValue(invokeResultChars);
|
||||
mono_free(invokeResultChars);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user