Bug 235664 - [oocalc] [bn-IN] date typed in english automatically gets converted to bengali
[oocalc] [bn-IN] date typed in english automatically gets converted to bengali
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openoffice.org (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Caolan McNamara
: i18n
Depends On:
  Show dependency treegraph
Reported: 2007-04-09 08:31 EDT by Runa Bhattacharjee
Modified: 2013-03-03 21:21 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-09 11:07:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screenshot of oocalc while the date is being typed in (39.03 KB, image/png)
2007-04-09 08:31 EDT, Runa Bhattacharjee
no flags Details
screenshot of oocalc after the date has been typed in (39.15 KB, image/png)
2007-04-09 08:32 EDT, Runa Bhattacharjee
no flags Details
before and after picture of the input (41.76 KB, image/png)
2007-04-09 12:21 EDT, Runa Bhattacharjee
no flags Details

  None (edit)
Description Runa Bhattacharjee 2007-04-09 08:31:55 EDT
Description of problem:

Date typed in english in the Bengali India locale gets converted to bengali
instead of remaining in english.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. start OpenOffice Calc in Bengali India locale: LANG=bn_IN.UTF-8 oocalc &
2. type in a date in the format 09-04-2007
3. press "Enter" and leave the cell
Actual results:

date typed in english automatically converts to bengali

Expected results:
date typed in english should remain in english

Additional info:

The digit conversion happens only for date formats. other numbers typed in
english remain in english.

date typed in bengali remains unchanged after leaving the cell.
Comment 1 Runa Bhattacharjee 2007-04-09 08:31:55 EDT
Created attachment 151987 [details]
screenshot of oocalc while the date is being typed in
Comment 2 Runa Bhattacharjee 2007-04-09 08:32:50 EDT
Created attachment 151988 [details]
screenshot of oocalc after the date has been typed in
Comment 3 Caolan McNamara 2007-04-09 11:07:13 EDT
Because it's a spreadsheet all dates entered in calc are detected as dates and
converted to the same internal date format. i.e. how it is entered has no true
bearing on how it is displayed. If the date is entered in bengali numbers or in
english ones it will be displayed the same way regardless of the input method used.

Now on to how they are displayed... Dates are displayed by default in the
"default" date format for the locale, in this case for Bengali it is
[NatNum1]DD-MM-YYYY (i.e format->cells->numbers under date, you can override
this by using "DD-MM-YYYY")

http://www.openoffice.org/nonav/issues/showattachment.cgi/26912/bn_IN.xml is the
xml file that describes the bn_IN date formats used by calc as submitted by the
bengali translation team from http://qa.openoffice.org/issues/show_bug.cgi?id=47575

The key bit is...

<FormatElement msgid="DateFormatskey7" default="true" type="medium" usage="DATE"

so the default bengali date display field is "[NatNum1]DD-MM-YYYY", and any
dates in calc are displayed like this be default. It would be possible to change
the default date display entry to DD-MM-YYYY but then the opposite effect of
dates entered in bengali format being displayed in english would exist.
Comment 4 Runa Bhattacharjee 2007-04-09 12:21:04 EDT
Created attachment 151996 [details]
before and after picture of the input
Comment 5 Runa Bhattacharjee 2007-04-09 12:22:13 EDT
ahh my mistake, should have been more clear.
The error here is not of the *format* but of the digits.
So here I have a case where i want to write a document with english alphabets
and numbers, including the date. The system uses the bn_IN locale hence OO.o
calc is also in the bn_IN locale. The input is in english and the date is
entered with english digits. The moment I leave the cell, automatically the
english digits get converted to bengali. The attachement above shows the before
and after picture.
Comment 6 Caolan McNamara 2007-04-09 14:36:27 EDT
I know, that is what I've described :-) The default *format* for displaying the
date in bn_IN or bn_BD is "[NatNum1]DD-MM-YYYY". Check the cell formatting, i.e.
format->cell->numbers you will see that is is automatically assigned
"[NatNum1]DD-MM-YYYY", change that to "DD-MM-YYYY" and it will be displayed in
Arabic numerals as is normal for e.g. english.

It doesn't matter what digits are used to enter the data, once it is detected as
a date then regardless of the number family used to enter it then it is
displayed as a date, and displayed by default with the default date format for
the locale. And the exact same thing is true for non-date numbers, if you type
Bengali digits that are not dates, then they will be displayed as arabic because
the default number formatting for bengali is 0, not [NatNum1]0. i.e all numbers
are displayed the same whether they were input in "english" or Benali. So this
bug could also be called "numbers typed in bengali automatically get converted
to english"

The way to resolve this as a user is to select the date cells, and manually set
the date format for the cells yourself by removing the [NatNum1] text from the
date format that was automatically chosen by calc. 

It's not a bug that it behaves like this. This is the correct behaviour
*assuming* that the settings that the upstream Bengali team choose for dates and
numbers are correct.

Note You need to log in before you can comment on or make changes to this bug.