0.0
No release in over 3 years
Low commit activity in last 3 years
Fix invalid UTF-8 and wipe invisible chars, compatible with Ruby 2.6+ with extensive specs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

string_cleaner¶ ↑

Just add a method .clean to String which does:

  • convert invalid UTF-8 strings from ISO-8859-15 to UTF-8 to fix them

  • recognize euro char from both ISO 8859-15 and Windows-1252

  • replace rn and r with n normalizing end of lines

  • replace control characters and other invisible chars by spaces

Supports only Ruby 2.6+

Install¶ ↑

sudo gem install string_cleaner

Example usage¶ ↑

"\210\004".clean # => " "

Copyright © 2009 Joseph Halter. See LICENSE for details.