On 21/05/08 07:53, Yakov Lerner wrote:
> On Mon, May 19, 2008 at 11:01 PM, Bram Moolenaar<[EMAIL PROTECTED]>  wrote:
>>>        :se fileencoding=utf8 bomb
>>>        :%!sort
>>>
>> The problem is with using an encoding that the sort command doesn't
>> understand [utf8]
>
> Maybe sort does understand utf8 (gnu sort definitely does), but
> vim does not set $LANG,$LC_ALL env.vars to reflect new&fenc  ?
> Maybe vim could auto-set env.vars. $LANG,$LC_ALL to
> reflect new&fenc? to help subprocesses know encoding of files they handle ...
> Maybe vim already does this .. but I do not see it.
>
> That won't help BOM-in-the-middle-of-file issue, of course.
>
> Yakov

To set the encoding locale for sort (etc.) subprocesses:

        :language ctype en_US.UTF-8

This will set $LC_CTYPE. You must still set the Vim 'encoding', 
'fileencodings', etc., separately. The Vim help says that "it is unusual 
to set this to something else than 'encoding'".

See ":help :language" and what it resends to.


Best regards,
Tony.
-- 
PISCES (Feb. 19 - Mar. 20)
        You have a vivid imagination and often think you are being
followed by the CIA or FBI.  You have minor influence over your
associates and people resent your flaunting of your power.  You lack
confidence and you are generally a coward.  Pisces people do terrible
things to small animals.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui