merge revision(s) 42251,46345,46346: [Backport #9903]

	* sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable
	  characters.

	* sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable
	  characters.

	* re.c (match_aref, rb_reg_regsub): consider encoding of captured
	  names, encoding-incompatible should not match.
	  [ruby-dev:48278] [Bug #9903]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e