Convert enum values in read attribute

Fix for issue #16459 and issue #14017