Add UTF-8 encoding for reading bulk updates #33
		Reference in New Issue
	
	Block a user
	
	No description provided.
		
		Delete Branch "patch-utf8encoding"
	
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit introduces the use of the
Encodemodule to ensure thatvalues being processed in the
WriteReadingssubroutine are correctlyencoded in UTF-8. The previous implementation did not account for
potential non-UTF-8 encoded data which could lead to issues when
updating readings.
The change specifically checks if the value (
$v) is marked as UTF-8using
Encode::is_utf8(). If it is, the value is re-encoded to UTF-8before being passed to
::readingsBulkUpdate(). This adjustmentensures that all data written to readings maintains proper character
encoding, improving compatibility and preventing potential data
corruption.
No breaking changes are introduced, but it is important for users
to validate that their readings correctly display any special
characters post-update.