Glom 1.8.7 - import crashes on bad input / export can't cope with , or " in text fields.

Bug #394894 reported by Maximiliano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glom (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: glom

Glom 1.87
Ubuntu 9:04

With Glom Export data to a file.
The data must have long text with return carriage.
Open another database and try to import the file.
Glom close without any message.
If erase the return carriage in the file to import, no problem.
Attach a capture to clarify.

Related branches

Revision history for this message
Maximiliano (meilan) wrote :
Revision history for this message
Maximiliano (meilan) wrote :

Between records have the same problem, when a record ends and start other record have the character of return carriage.

Revision history for this message
Murray Cumming (murrayc) wrote :

I don't know how the comma-separated (CSV) file format could support return characters in text fields, or if it should. Maybe quotes around the text would allow it. I need to check what other programs such as FileMaker do.

But it certainly shouldn't crash. Could you please attach an example file so I can try it.

Revision history for this message
Maximiliano (meilan) wrote : Re: [Bug 394894] Re: Glom 1.8.7 - can't import data

The CVS file was created by Glom when Export.
With Open Office can see the return characters "Ctrl+F10", or with
Abiword "Crtl+*"
Attach the Glom database "Clientes.glom" and the CSV file "File to import.csv".

Maximiliano

El vie, 03-07-2009 a las 07:22 +0000, Murray Cumming escribió:
> I don't know how the comma-separated (CSV) file format could support
> return characters in text fields, or if it should. Maybe quotes around
> the text would allow it. I need to check what other programs such as
> FileMaker do.
>
> But it certainly shouldn't crash. Could you please attach an example
> file so I can try it.
>
--
                  ____________________________________
                             Estudio MEILÁN
                     (arquitectura y construcción)
                  Avda. Artigas y Zabala - Piriápolis
                  Tel.(043) 27431 - www.meilan.com.uy
                  ____________________________________

Murray Cumming (murrayc)
summary: - Glom 1.8.7 - can't import data
+ Glom 1.8.7 - import crashes on bad input / export can't cope with , or "
+ in text fields.
Revision history for this message
Murray Cumming (murrayc) wrote :

I think we should follow the description of CVS formats from here:
http://en.wikipedia.org/wiki/Comma-separated_values
which luckily mentions a specification:
http://tools.ietf.org/html/rfc4180

I think that means that we should
- put quotes around the text fields. We do that already, using ' quotes, but we should use " quotes.
- escape " as "". We don't do that now.
- not escape ' as '' as we do now.
- not escape newlines. We don't escape them now, but we need to change the import parser to not interpret these as the end of a record.
- not escape ,. We don't do that now.

I'll take a look and make import/export compliant with that RFC.

Revision history for this message
Murray Cumming (murrayc) wrote :

I believe this is now fixed as per the CSV RFC, but only in the Glom 1.11/12 (master) branch in git. It would not be easy to make the same change in Glom 1.8 or 1.10.

Changed in glom (Ubuntu):
status: New → Fix Committed
Revision history for this message
Maximiliano (meilan) wrote : Re: [Bug 394894] Re: Glom 1.8.7 - import crashes on bad input / export can't cope with , or " in text fields.

Great anyway. Thanks

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glom - 1.12.2-0ubuntu1

---------------
glom (1.12.2-0ubuntu1) karmic; urgency=low

  * New upstream version:
    - FFE LP: #391664
  * debian/control:
    - Bump python-gnome2-extras-dev build-dep to >= 2.25.3.
    - Bump libgdamm3.0-dev build-dep to libgdamm4.0-dev >= 3.99.14.
    - Change libgda3-dev build-dep to libgda-4.0-dev.
    - Change libgda3-postgres dependency to libgda-4.0-postgres.
    - Bump libgtkmm-2.4-dev build-dep to >= 2.14.
    - Add build-dep on libgconfmm-2.6-dev.
    - Bump libgoocanvasmm-dev build-dep to >= 0.14.0.
    - Remove build-dep on libbakery-2.6-dev.
    - Bump postgresql-8.3 dependency to postgresql-8.4.
    - Change scrollkeeper build-dep to rarian-compat.
    - Rename libglom{0,-dev} -> libglom-1.12-{0,dev}. Upstream include
      APIVER in the library name now.
  * debian/rules:
    - Update --with-postgres-utils configure flag to point to the new
      path.
    - Drop deprecated --disable-scrollkeeper configure flag.
    - Update DEB_SHLIBDEPS_INCLUDE with new libglom-1.12-0 package name.
    - Don't include /usr/share/cdbs/1/rules/simple-patchsys.mk - there
      are currently no patches.
  * debian/libglom-1.12-0.install:
    - Updated for new version.
  * debian/libglom-1.12-dev.install:
    - Install pc and header files.
  * debian/glom-doc.install:
    - Updated for new version.
  * debian/glom.install:
    - Updated for new version.
  * Fix debian/watch.
  * Dropped obsolete 10-distro-install-postgres-change.patch.
  * Built against latest libgoocanvasmm (LP: #428445).
  * Also closes LP: #230007, LP: #393229, LP: #393231, LP: #394507,
    LP: #394887, LP: #394894, LP: #397409, LP: #381563.

 -- Chris Coulson <email address hidden> Fri, 09 Oct 2009 16:50:36 +0100

Changed in glom (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.