To: vim_dev@googlegroups.com Subject: Patch 8.0.1833 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1833 Problem: X11: ":echo 3.14" gives E806. Solution: set LC_NUMERIC to "C". (Dominique Pelle, closes #2368) Files: src/gui_x11.c *** ../vim-8.0.1832/src/gui_x11.c 2018-05-06 19:19:32.382254324 +0200 --- src/gui_x11.c 2018-05-13 16:21:50.858973069 +0200 *************** *** 1282,1287 **** --- 1282,1298 ---- cmdline_options, XtNumber(cmdline_options), CARDINAL &gui_argc, gui_argv); + # if defined(FEAT_FLOAT) && defined(LC_NUMERIC) + { + /* The call to XtOpenDisplay() may have set the locale from the + * environment. Set LC_NUMERIC to "C" to make sure that strtod() uses a + * decimal point, not a comma. */ + char *p = setlocale(LC_NUMERIC, NULL); + + if (p == NULL || strcmp(p, "C") != 0) + setlocale(LC_NUMERIC, "C"); + } + # endif if (app_context == NULL || gui.dpy == NULL) { gui.dying = TRUE; *** ../vim-8.0.1832/src/version.c 2018-05-13 15:59:44.898287919 +0200 --- src/version.c 2018-05-13 16:23:06.922270296 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1833, /**/ -- ARTHUR: No, hang on! Just answer the five questions ... GALAHAD: Three questions ... ARTHUR: Three questions ... And we shall watch ... and pray. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///