From: "Wolfgang Nádasi-Donner" Date: 2007-10-23T03:32:39+09:00 Subject: Re: Encoding::primary_encoding I made some tests with UFT-8, option "-Ku", option "-Ka" and both types of magic coding comments on Windows (Ruby 1.9 built using MSYS). Results are: 1) Both types of magic comments ("# vi: set fileencoding=utf-8" and "# -*- coding: utf-8 -*- " on first line) are possible and will be recognized. Both overwrite a "-Ka" option and will work if the file doesn't contain a BOM. 1) An UTF-8 file without a BOM will be recognized as ASCII-8BIT and processed like this. If the Option "-Ku" ist used, it will be recognised and processed as UTF-8 encoded. Thats all upto now. Are there other possible values for magic comments? - I didn't find anything in the sources. Wolfgang N�dasi-Donner