[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: KOScript & KSpread
From: David Faure <david () mandrakesoft ! com>
Date: 2001-08-23 11:20:43
[Download RAW message or body]
On Thursday 23 August 2001 12:51, Werner Trobin wrote:
> Hi!
>
> I thought I'll have some fun in the holidays and try to make
> KOScript work with Unicode input and stuff like that. I started
> to check the sources and now I have some questions:
>
> 1) What happens when someone transfers his KSpread files to a
> different country? Should we try to convert the time/money
> formats? (e.g. change "1.200,34" to "1 200.34" or so depending
> on the settings in KLocale or leave them as they are?
> Related to that is the question of scanning these literals, but
> that's "only" an implementation issue... I guess I can make that
> work with some more C code within the scanner.
I don't remember what KSpread does, but here's what should happen IMHO :
the value should be stored in a locale-independent way (i.e. in the C-locale way,
like 1200.34), and displayed using KLocale. This way, if you give your file to
someone in a different country, it'll be parsed allright, simply displayed \
differently.
FWIW, I had a look at gnumeric about this issue (long ago), and they use an \
interesting hack^H^H^H^Htechnique : locale = currentLocale() ; setLocale("C") ; \
save() ; setLocale( locale ) :) I love C :)
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
_______________________________________________
Koffice-devel mailing list
Koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic