[fpc-pascal] Patch: new XML export for FCL-DB, was: SDFDataset multiline support: request for a look at patch+test, issue 17285

Reinier Olislagers reinierolislagers at gmail.com
Sat Jul 23 14:18:39 CEST 2011


On 23-7-2011 14:06, Ludo Brands wrote:
>>> The decimal point needs also to be localised ;(
>> Actually, I might just leave it in US format as a . - this 
>> will at least fix the format and allow import by 
>> US/Anglophone countries. What do you think? (Better yet, I'll 
>> have a look at how newer versions of Access do this, maybe MS 
>> have fixed this since then)
>>
> 
> DecimalSeparator is set to the system value in Sysutils and correspond to
> the machines localisation. You shouldn't hardcode it.
Well, I want to have the same output regardless of which locale you're
in. (Unless there's a really good reason not to do that, or maybe, if
there is a way to specify locale in the output XML)
So then I should hardcode it, right? (I'm resetting them to their
previous settings at the end of the module, but there might be a better
way of doing that).

Or, quite probably, there's a better way to use FloaltToStr with a .
without having to mess with DecimalSeparator. Had a quick look through
the documentation but couldn't find anything obvious.
Does anyone have any suggestions?

> 
> The currency sign and thousands separators is for display use only. I
> haven't seen any data format using them. Luckily, that is. The decimal
> separator is already confusing enough.
Yes, it does simplify things. But there might be a difference between 1
Zimbabwean dollar and 1 Swiss franc - both will display as 1 :(




More information about the fpc-pascal mailing list