/magic_encoding

Easily manage magic comments for encoding for your ruby 1.9 applications

Primary LanguageRubyMIT LicenseMIT

Forked from magic_encoding

Magic encoding is a great tool to convert files to a specific encoding, but I don’t like the Emacs comments style, so…

Installation

gem install magic_encoding_just_for_ruby

Usage

you can call the tool from the console with default parameters like so

magic_encoding

this will prepend every “.rb” file in the working directory (recursively) with the following line :

# encoding : utf-8

Notes :

  • existing magic comments are replaced

  • the rest of the file remains unchanged

  • maybe utf-8 is the only encoding we need