Issue 35530 - Openoffice truncate numeric-values
Summary: Openoffice truncate numeric-values
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1.2
Hardware: PC Linux, all
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2004-10-14 12:40 UTC by tkaminski
Modified: 2013-08-07 15:45 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description tkaminski 2004-10-14 12:40:28 UTC
i use openoffice 1.1.2, unixodbc 2.2.4, postgresql 7.4.3 with Debian Linux (on 
i386). All with german locales. 
With this i use tables and macros, over odbc-connection, and make an access to 
postgresql-database. The enviroment LANG is set to "de_DE@euro". This is 
correct. Openoffice use this. This all works fine. 
But Database-Values of type numeric (same as decimal) are displayed truncated. 
Openoffice show a value of 5,55 as 5,00 ("," not "." in german!) 
An Example 
In psql, The Postgresql-Database-Shell: 
CREATE TABLE tktest( intfeld integer, realfeld real, numericfeld numeric, 
numeric2feld numeric(9,2)}; 
INSERT INTO tktest(intfeld, realfeld, numericfeld, numeric2feld) VALUES(555, 
5.55, 5.55, 5.55); 
select * from tktest; 
 intfeld | realfeld | numericfeld | numeric2feld 
     555 |     5.55 |        5.55 |         5.55 
This is OK. 
In isql, The ODBC-Database-Shell: 
select * from tktest; 
| intfeld    | realfeld     | numericfeld | numeric2feld| 
| 555        | 5.5500002    | 5.55        | 5.55        | 
This is OK. (I known, why i dont want to use real-types). 
And now i open the Databasebeamer of Openoffice with Hotkey F4. 
intfeld realfeld numericfeld numeric2feld 
555     5,55     5,000000    5,00 
Where is the "5,55" in numeric? Why this display 5,00? 
All vars in forms, they use this Values, display the same wrong content. 
The displayformat have no effect to this. 
- If i use a macro and calculate with this values, then are the calculate 
value are correct. 
- If i copy the Database to a calc-document, then all values are correct. 
- If i set the enviroment LANG to a unvalid value like "de_de@blablabla", then 
then all values are correct. But this is agly for the rest of the system. 
- If i unset the enviroment LANG, then all values are correct. But this 
provide openoffice to use the english language. Not usefull in germany. 
I read in the german openoffice-user-list, the same problem exists with mysql.  
Im think, this is a error of Openoffice?  
bye Thomas
Comment 1 marc.neumann 2004-11-17 14:16:29 UTC

I can reproduce this. I send it to the right developer.

Bye Marc
Comment 2 Frank Schönheit 2004-11-17 15:58:46 UTC
I'd say this should be "OOo 2.0" then, as it sounds pretty serious.
Comment 3 ocke.janssen 2004-11-18 13:07:20 UTC
Set to dba
Comment 4 ocke.janssen 2004-11-18 13:34:27 UTC
Here it comes.
In short it is a problem of SQLGetData for Numeric columns. The value is always
"5.55" -> "5,55" for a german locale.
I found the link below which describes excatly the same behavior for MyODBC.

>> The problem is that the SQL standard requires numbers to have '.' and
>> not ','.

So should SQLGetData avoid to localize it's data? 
Comment 5 holgerbruenjes 2004-11-18 16:51:28 UTC
Yes, with MYODBC it is the same. But when i change the locale of
'LC_NUMERIC=de_DE' it works fine. Only the locale 'LC_NUMERIC=de_DE@euro' works
Comment 6 holgerbruenjes 2004-11-18 21:41:21 UTC
I have fond a mistake. In one of my table i have a 'formattet field' and this
work fine and an other 'numeric field' and this work wrong.

So I change the 'numeric field' to a 'formattet field' and OO.o works fine.

And so I am thing in german we shall use the 'formattet field' or?
Comment 7 stx123 2005-01-20 10:05:15 UTC
Hi Frank, Ocke, as Martin pointed out on the releases list we are coming
closer to 2.0 Beta.

Is your work making progress and would be ready for 2.0
as the target milestone indicates?

Thanks, Stefan
Comment 8 Frank Schönheit 2005-01-20 13:58:12 UTC
This is a problem external to, which cannot be solved in OOo.
Comment 9 mhatheoo 2005-03-14 19:07:33 UTC
Hallo Frank

Is it really an "external" problem - we do have the same problem with localized
versions of oo.o for the windows-world, didn't we.

Comment 10 Frank Schönheit 2005-03-16 07:43:51 UTC
I remember we did have such problems, but don't find the issue. Do you have it?

For this particular issue here, Ocke traced it down to the ODBC driver returning
data in a non-conformant way, there is not really much we can do about this on
OOo side (except perhaps some guessing and magic, but I would not really want to
introduce such hacks).