Bug 164542 - Tibetan digits not recognized as numbers in Calc
Summary: Tibetan digits not recognized as numbers in Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format Calc-Enhancements Calc-Cells
  Show dependency treegraph
 
Reported: 2025-01-02 14:01 UTC by Elie Roux
Modified: 2025-01-03 11:36 UTC (History)
6 users (show)

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 Elie Roux 2025-01-02 14:01:30 UTC
Description:
An administration I'm in contact with has a policy to use Tibetan digit characters (༡, ༢, ༣, etc.) instead of Latin ones (1, 2, 3, etc.). Cells containing these characters are well recognized as numbers in MS Excel and all the math formulas work, but I couldn't get LibreOffice to recognize them as numbers. (I suspect this is not specific to Tibetan but I didn't test with other non-Latin digits in Unicode).

Please map these characters to numbers so that people can do math in their own characters in LibreOffice!

Steps to Reproduce:
1. copy paste the following in a cell: ༡༢༣

Actual Results:
the characters are aligned left in the cell and math formulas don't work on the cell

Expected Results:
the characters should be aligned right and math formulas should work


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 1 BogdanB 2025-01-02 20:06:05 UTC
Confirm with
Version: 25.2.0.1 (X86_64) / LibreOffice Community
Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 2 V Stuart Foote 2025-01-02 21:18:39 UTC
So, guess this would be for coding cell formatting presentation and maybe keyboard entry. But that the internal numeric values within the ODF Spreadsheet are still 0-9.

Looks like CLDR bo.xml provides:

<exemplarCharacters type="numbers">[\- ‑ , . % ‰ + 0༠ 1༡ 2༢ 3༣ 4༤ 5༥ 6༦ 7༧ 8༨ 9༩]</exemplarCharacters>

Not in the initial locale work for bug 64977 (bo-IN or bo-CH), nor as tweaked in https://gerrit.libreoffice.org/c/core/+/150952

But IIRC we don't make direct use of CLDR "numbers" anyhow (OpenGrok offline at the moment so can't check).
Comment 3 Laurent Balland 2025-01-03 07:53:10 UTC
I confirm that pasting ༡༢༣ in Calc gives only text if locale number format is different than Tibetan.
But, if you paste two lines of characters: Copy
༡༢༣
foo

Then paste => you get the Import Text dialog which enables you to select the locale. If set to Tibetan, then Tibetan digits are correctly paste.

Moreover, if locale Number format of cell is set to Tibetan prior pasting ༡༢༣ in it, ༡༢༣ is correctly recognized as number 123.

Excel detects that ༡༢༣ is Tibetan digits and modify the locale Number format (prior pasting) to
[$-bo-CN,F00]0

whereas LibreOffice respects the number format defined in the cell.

Version: 24.2.6.2 (X86_64) / LibreOffice Community
Build ID: ef66aa7e36a1bb8e65bfbc63aba53045a14d0871
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded

Microsoft Excel 2016
Comment 4 Elie Roux 2025-01-03 08:18:51 UTC
Thanks! Indeed if I go to

Format -> Cells -> Numbers -> Language and select Tibetan, when I copy ༡༢༣ it gets transformed into 123 (and I literally see "123" in the UI, not "༡༢༣"). It's a step forward but it's not really the desired outcome. The goal is really to 

- see "༡༢༣" in the UI
- be able to do maths with it (SUM, etc.) just like with any number

like in Excel. Is that possible?
Comment 5 Laurent Balland 2025-01-03 10:11:57 UTC
(In reply to Elie Roux from comment #4)
> Format -> Cells -> Numbers -> Language and select Tibetan, when I copy ༡༢༣
> it gets transformed into 123 (and I literally see "123" in the UI, not
> "༡༢༣"). It's a step forward but it's not really the desired outcome.
To display with Tibetan digits, you need to modify the format code to something like:
[NatNum1]General
or
[NatNum1]0

You may modify the default cell style to apply to all cells and create a template with it.
Comment 6 Elie Roux 2025-01-03 10:41:23 UTC
Thanks for the tip, you're right that with the correct configuration it works well. Now the copy/paste behavior could, I think, try to guess the locale so that it's as convenient as Excel (the configuration to get LO working with Tibetan numbers is a bit advanced for most users I think).
Comment 7 Laurent Balland 2025-01-03 11:36:22 UTC
(In reply to Elie Roux from comment #6)
> Now the copy/paste behavior could, I think, try to guess the
> locale so that it's as convenient as Excel
I agree. Set to NEW

> (the configuration to get LO
> working with Tibetan numbers is a bit advanced for most users I think).
That's why I suggested to create a template.