Zaru takes a given filename (a string) and normalizes, filters and truncates it, so it can be safely used as a filename in modern operating systems. Zaru doesn't remove Unicode characters when not necessary.
Thomas Fuchs
gem "zaru", "~> 0.0.3"