[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: different locale based on directory



Andrei Popescu wrote:
> On Mon,04.May.09, 19:46:39, Johannes Wiedersich wrote:
>> Hallo list!
>>
>> I have a "funny" tex-file (sty and tex) that requires the deprecated
>> latin1 encoding. (It was originally developed for lusers of another OS).
>> My system is lenny and utf-8.
>>
>> Is there a way to configure my editor [1] to use the latin1 encoding for
>> certain files or directories and utf-8 for all the rest?
> 
> How about a wrapper script (untested)?
> 
> if [ `pwd` = $MY_DIR ] ; then
> 	LANG=... editor $@
> else
> 	editor $@
> fi

Thanks.

I've thought about that, too. However, I usually have different
documents open with kile, some of which might be utf-8, while others are
latin1. In that scenario I guess the setting will win that happens to
apply to the first opened document.

Maybe the 'best' approach would be to use different editors for either
documents. Though, this is not as elegant as I hoped for...


if [ `pwd` = $MY_DIR ] ; then
	LANG=... editor2 $@
else
	editor1 $@
fi

Cheers,
Johannes


Reply to: