How I fixed a critical encoding issue in Ruby's debug gem when LANG environment variable is empty, using String#scrub for graceful error handling.