octave-maintainers
[Top][All Lists]
Advanced

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

Re: locale support patch for [fs]sscanf function


From: John W. Eaton
Subject: Re: locale support patch for [fs]sscanf function
Date: Thu, 19 Jan 2012 10:33:29 -0500

On 19-Jan-2012, CdeMills wrote:

| 
| John W. Eaton wrote
| > 
| > On 18-Jan-2012, Jordi Gutiérrez Hermoso wrote:
| > 
| > I think that we should back off on this and consider locale support
| > more generally before pushing anything related to locales.
| > 
| > 
| I looked yesterday at the implementation of boost::locale at 
| http://cppcms.sourceforge.net/boost_locale/html/index.html
| 
| See in particular the comments about "Common Critical Problems with the
| Standard Library". I agree that there should be something more global, but
| first we have to ensure that UTF-8 strings can be used everywhere. For
| instance:
| octave> sprintf("%d bétises (%d stupidities)", 18, 18)
| ans = 18 bétises (18 stupidities)
| 
| works on my machine, but will it work on each machine/compiler combo ? What
| if The Others come with their own locale implementation using a totally
| different interface ? Should we consider adding more libs, like ICU ? 

I don't think Octave currently handles 8-bit characters properly, much
less wide characters.  So we might have to handle that before we can
really deal with locales properly.

| My current implementation is minimalist and does not change current
| behaviour. I'm OK with dropping it once we get more general locale support.
| For now it permits me to solve pratical issues with files produced with
| french locales.

I think you could also solve that problem with sed.

jwe


reply via email to

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