Red Hat Bugzilla – Bug 235664
[oocalc] [bn-IN] date typed in english automatically gets converted to bengali
Last modified: 2013-03-03 21:21:14 EST
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):
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
date typed in english automatically converts to bengali
date typed in english should remain in english
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.
Created attachment 151987 [details]
screenshot of oocalc while the date is being typed in
Created attachment 151988 [details]
screenshot of oocalc after the date has been typed in
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.
Created attachment 151996 [details]
before and after picture of the input
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.
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
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.