|Summary:||[oocalc] [bn-IN] date typed in english automatically gets converted to bengali|
|Product:||Red Hat Enterprise Linux 5||Reporter:||Runa Bhattacharjee <runab>|
|Component:||openoffice.org||Assignee:||Caolan McNamara <caolanm>|
|Status:||CLOSED NOTABUG||QA Contact:|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2007-04-09 15:07:13 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Runa Bhattacharjee 2007-04-09 12:31:55 UTC
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): openoffice.org-calc-2.0.4-184.108.40.206 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 12:31:55 UTC
Created attachment 151987 [details] screenshot of oocalc while the date is being typed in
Comment 2 Runa Bhattacharjee 2007-04-09 12:32:50 UTC
Created attachment 151988 [details] screenshot of oocalc after the date has been typed in
Comment 3 Caolan McNamara 2007-04-09 15:07:13 UTC
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" formatindex="21"> <FormatCode>[NatNum1]DD-MM-YYYY</FormatCode> <DefaultName></DefaultName> </FormatElement> 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 16:21:04 UTC
Created attachment 151996 [details] before and after picture of the input
Comment 5 Runa Bhattacharjee 2007-04-09 16:22:13 UTC
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 18:36:27 UTC
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.