emacs-devel
[Top][All Lists]
Advanced

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

Re: CSV parsing and other issues (Re: LC_NUMERIC)


From: Eli Zaretskii
Subject: Re: CSV parsing and other issues (Re: LC_NUMERIC)
Date: Fri, 04 Jun 2021 22:17:24 +0300

> Cc: utkarsh190601@gmail.com
> From: Maxim Nikulin <manikulin@gmail.com>
> Date: Fri, 4 Jun 2021 23:31:13 +0700
> 
> > Setting a locale globally in Emacs is a non-starter, for the reasons
> > that you point out and others.  Text processing in Emacs is generally
> > separate from the current locale's rules, mainly to have Emacs work
> > the same in any locale.  So passing a locale argument to functions
> > that produce output, with the intent to request some behavior to be
> > tailored to that locale, is the only reasonable way to have this kind
> > of functionalities in Emacs.  The problem with that, of course, is
> > that not every supported platform can dynamically change the locale,
> > let alone do that efficiently.
> 
> I do not think it is efficient to require from users to fight with 
> number formatting themselves.

I didn't suggest that.  I was talking about the design of the APIs
that need to be able to provide locale-specific formatting.  The
implementation should be provided by Emacs core, of course.

> Do you mean that it is necessary to create new implementation of number 
> formatter specially for Emacs?

Either that, or use the underlying C library if it can accept a locale
specifier, or if it supports efficient dynamic change of the locale,
like we do in some of the implementations of string-collate-lessp.

> On linux I see that Emacs is linked with ICU

It isn't.  It's either HarfBuzz or maybe libc that pulls in the ICU
library.  Emacs doesn't use it directly.

> Do you have a bright idea concerning implementation of parser-formatter 
> for numbers with reasonable efforts?

See above.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]