[Libreoffice] Incorrect save NUMBER value to DBF

Alexandr N. Zamaraev tonal.promsoft at gmail.com
Thu Sep 30 09:33:17 PDT 2010


Open Office Calc save numeric value in numeric column as text
representation add null chars right for column with.
Bat other applications save value as text and space chars left for
column with.

For example:
Format: N, 3, 0
Value: 1
Calc saved value (hex): 31 00 00
Other Apps saved value (hex): 20 20 31

This inaccuracy does not affect the format of the readers implemented in
C or C++ but can break the implementation in other languages (Python,
Ruby, Haskell)

Number column format descriptions:
  "Number stored as a string, right justified, and padded with blanks to
the width of the field."
  http://www.dbase.com/KnowledgeBase/int/db7_file_fmt.htm :

  "Numeric: . 0 1 2 3 4 5 6 7 8 9 + -, right justified, left blank filled"
  http://linux.techass.com/projects/xdb/xbasedocs/xbase_c2.html:

LibreOffice iusse 30504:
  https://bugs.freedesktop.org/show_bug.cgi?id=30504
OOo iusse 44116:
  http://www.openoffice.org/issues/show_bug.cgi?id=44116
Russian discursions:
  http://community.i-rs.ru/index.php/topic,5783.0.html
  http://community.i-rs.ru/index.php/topic,15643.0.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DTable.diff
Type: text/x-diff
Size: 7299 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20100930/87c440b5/attachment.diff>


More information about the LibreOffice mailing list