On 09/06/08 03:43, Bill McCarthy wrote: > On Sun 8-Jun-08 4:25pm -0600, Bram Moolenaar wrote: >> Bill McCarthy wrote: > >>> (2) does this LC_NUMERIC actually work on Windows - I recall having >>> problems with LC_ALL using the unix sort of GNU >>> coreutils - is this an environment variable we need to set? > >> I haven't tried it. So please set your environment so that a comma is >> used for a decimal point and then run Vim to try out the floating point >> stuff. > > The patch applied flawlessly. Both Vim and Gvim makes were > without warnings. > > Without setting any environment variables,all of my tests > are working as expected. > > Also, commas don't work as expected. Here's what I get > from: > > :echo 1,2 > > 1 > E15: Invalid expression: ,2 > E15: Invalid expression: ,2 >
I get the same but I think it's expected -- at least with my locale :lang Current language: "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C" When I was on Windows, it didn't accept C as a locale but it did accept en so, since I wanted menus and messages in English and not in the French or Dutch of my Windows locale, I started my vimrc with if has("unix") language messages C else language messages en endif runtime vimrc_example.vim etc. Since Vim has no separate ":language numeric" setting, I suppose it should be set with ":language en" or similar. If you want to keep messages and/or ctype and/or time in your default locale, you'll need to save and restore them, for instance: let save_messages = v:lang let save_time = v:lc_time let save_ctype = v:ctype if has("unix") lang C else lang en endif exe "lang mess" save_messages exe "lang time" save_time exe "lang cty" save_ctype Best regards, Tony. -- "Contrariwise," continued Tweedledee, "if it was so, it might be, and if it were so, it would be; but as it isn't, it ain't. That's logic!" -- Lewis Carroll, "Through the Looking Glass" --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---