The portgroup cannot possibly know what encoding will the produced Makefile use.
Port p5-yaml is using ExtUtils::MakeMaker that in turn relies on Pod::Man. Pod::Man can produce utf8 Makefiles, search utf8 in in this page but seems that MakeMaker doesn't have any option to specify that, see this request.
Since the portgroup is patching Makefiles we could sanitize the file by adding a new variable specifying a charset to convert from. In this case the portfile writer would specify something like
perl5.makefile_encoding iso8859-1
perl5.setup YAML 0.90
and the post-configure phase would take care of convert the file to UTF-8 (or any other target encoding depending on the darwin release) before reinplaces.