puppetlabs/puppetdb — pull request #348 by cprice-puppet (2012-11-13 20:07:28+00:00)
Title: (#17216) Change default behavior of ruby1.8 UTF-8 to strip invalid chars

Prior to this commit, our manual-scrubbing UTF-8 code for ruby 1.8
would replace invalid characters with the unicode replacement
character. While I consider this preferable, we are now using
IConv as part of our default code path again, and it simply strips
invalid characters rather than replacing them with the replacement
char. In order to make our code more consistent with that behavior,
we now accept a boolean parameter which tells us whether to strip
invalid characters or replace them.

This commit also updates the spec tests to conform to this behavior,
and thus, you know... pass.