Problem
Some sources (ex. locale.module) has non-ascii chars inside and than to properly view them needs manual selecting of character set in editor.
Solving
Fortunately some advanced editors (mostly on unix) has agreement to check first lines of file for charset hints. They find string like:
"-*- coding: CHARSET -*-", where charset is any standard charset, ex. utf-8 or koi8-r etc. In our case we need place string after CVS $Id$:
// -*- coding: utf-8 -*-
And then files with utf-8 chars will be open correctly, charset will converts automatically to user locale. For example beloved by programmers Emacs and Vi - both can do so thing.
Cause
Some time ago we rename files in CVS from README, INSTALL etc. to README.txt, INSTALL.txt - to be compatible with windoze. Then, for recovering of world balance of good and evil we need to make step aside unices - make sources be more compatible with unix text editors.
Is anybody against? :)
Comments
Comment #1
beginner commentedI am ok about the principle.
You mean that we just need to add this one line of code at the beginning of each .inc or .module file?
What would be the settings for vim, to use this feature?
Comment #2
Steven commented-1. UTF-8 should be the default locale already on your system. Plus, due to its regular byte signature, UTF-8 is easy to identify automatically with 99.99% certainty.