Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I came across some Ruby scripts on Github. The first line is the normal shebang (#!/usr/bin/ruby), but the second line is the following:

# -*- coding: utf-8 -*-

I didn't know this method of declaring character encoding! Is this just a Ruby thing, or can I use it (for example) in Bash scripts as well?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

That's actually the emacs way of defining character encoding.

It's not just a Ruby thing as Python understands it too. But, Bash knows nothing of it.

share|improve this answer
    
Thanks! :) Voted up. –  Zearin Jul 1 '11 at 16:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.