string_cleaner
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Fix invalid UTF-8 and wipe invisible chars, fully compatible with Ruby 1.8 & 1.9 with extensive specs
= 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 \r\n 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

Copyright (c) 2009 Joseph Halter. See LICENSE for details.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。