Bug 167321 - Pasting decimal numbers with commas splits them into multiple columns due to incorrect delimiter detection
Summary: Pasting decimal numbers with commas splits them into multiple columns due to ...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.3.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-01 11:10 UTC by Dodo Ivanecky
Modified: 2025-07-02 07:19 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dodo Ivanecky 2025-07-01 11:10:11 UTC
When pasting a list of decimal numbers using a comma as the decimal separator (e.g. 0,325), LibreOffice Calc incorrectly splits the value into multiple columns, as if the comma were a field delimiter. This happens even if each line only contains a single value.

This behavior is especially disruptive when pasting into a column formatted as percentage or number, where the user expects the pasted values to remain intact.

Steps to reproduce:

Copy the following text into the clipboard 

0,235  
0,3253  
0,5121
In LibreOffice Calc, select a cell in a column formatted as % or Number.

Paste using mouse.

Actual result:
If you do not notice that auto detection is selected then each value is split into two columns (e.g. 0 in one cell, 235 in the next).

Expected result:
The pasted values should remain intact as 0,235, 0,3253, etc., and occupy only one column each.

Suggested solutions:
Add an option to disable automatic delimiter detection in the "Text Import" dialog when pasting.

Or apply a safer heuristic: if there's only one comma and no other delimiters, treat it as a decimal separator rather than a field separator.

Or at least provide a global preference to control this behavior.
Comment 1 fpy 2025-07-02 07:10:30 UTC
since it's very OS and locale dependant, please be specific : https://wiki.documentfoundation.org/QA/BugReport#Details

also see "Paste Special". eg https://ask.libreoffice.org/t/finaly-edition-swap-commas-periods-in-thousands-separators-decimal-numbers/104391/2
Comment 2 Dodo Ivanecky 2025-07-02 07:19:22 UTC
Sorry, I realized just later that the LOCALE is a key to the problem.
 locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="sk_SK.UTF-8"
LC_NUMERIC="sk_SK.UTF-8"
LC_TIME="sk_SK.UTF-8"
LC_COLLATE="sk_SK.UTF-8"
LC_MONETARY="sk_SK.UTF-8"
LC_MESSAGES="sk_SK.UTF-8"
LC_PAPER="sk_SK.UTF-8"
LC_NAME="sk_SK.UTF-8"
LC_ADDRESS="sk_SK.UTF-8"
LC_TELEPHONE="sk_SK.UTF-8"
LC_MEASUREMENT="sk_SK.UTF-8"
LC_IDENTIFICATION="sk_SK.UTF-8"
LC_ALL=sk_SK.UTF-8

For some languages, the decimal delimiter is not a period ('.') but a comma (','). Alternatively, providing an option to disable auto-detection would also be a solution.