[Libreoffice-bugs] [Bug 138537] Import CSV sometimes change delimeted char-values to numbers

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Nov 29 09:45:53 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=138537

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |NOTABUG

--- Comment #7 from Mike Kaganski <mikekaganski at hotmail.com> ---
It is not "FIXED", it's NOTABUG. Fixed is where something (known) had been
changed in the software to remove the pre-existing actual problem in it.

(In reply to Frank B. from comment #5)
> I can't agree with your result.
> 
> As you see, it's not only depending on "exactly three digits, separated by
> the locale's *thousand separator*", but with languages settings before
> import.

1. Of course, as I wrote: "exactly three digits, separated by the locale's
*thousand separator*". The phrase combined two factors: grouping of three
digits, and *locale-specific* thousand separators.

> AND: the values are bracketedby " with indicates, this IS TEXT

No. In CSV, quotes are not for TEXT. CSV does not have notion of "data type" at
all, ALL its content is text. It's up to application to try (or not) to
interpret the textual elements of each record in CSV. Quotes in CSV are not to
mark elements as "text", it's to mask some characters in elements that
otherwise would have special meaning in CSV, like separators or newlines. That
all is described in RFC 4180 [1].

> AND: in the preview, it is imported correctly

Preview does not "imports" things (in the sense that it does not interpret
values), it just shows you the content of N first lines, *separated* by the
rules that you define, so that you have the idea what gets into which cell. The
conversions are performed only at actual import.

(In reply to Frank B. from comment #6)
> in my opinion, values in "-brackets should be conversion-proof.
> 
> If I want to have numbers, I could create a file like this:
> 
> 1.72.0.0,1.79.255.255,"JP","Japan"
> 
> but I created this:
> 
> "1.72.0.0","1.79.255.255","JP","Japan"

As described above, that's your misconception, and if you imply some special
processing of quotes does not necessarily mean that it's what the format says
about it.


[1] https://tools.ietf.org/html/rfc4180

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201129/3a5e215c/attachment.htm>


More information about the Libreoffice-bugs mailing list