My only input in this thread has been on the subject of SQL injection. This was my intention. Your statement "But perhaps your answer wasn't as helpful as intended in this context?" is confusing as my response (again, not to the encoding issue) was clearly of use to them, albeit with a problem they didn't even know they had.
Often on perlmonks people reply to posts pointing out problems/issues with code which are unrelated to the question the user is asking. Often this is because the user is totally unaware of the problem. This is a perfectly valid thing to do.