Apache OpenOffice (AOO) Bugzilla – Issue 59332
Excessive [$-41E] in Thai native number formats
Last modified: 2017-05-20 11:13:51 UTC
There are excessive format string '[$-41E]', which is used to denote currency locale/format, in all Thai native number formats. Those that affect are number formats with [NatNum1]. There seem to be a '[$-41E]' added after every [NatNum1], if there's none already. User-defined format suffer the same problem. Steps to reproduce:- 1) In Calc, use Thai locale 2) Select a cell with number, then select Format->Cell->Numbers 2) Select Category = Number 3) Select a Thai digit format, like -๑๒๓๔ 4) In Format code you'll see excessive [$-41E], e.g. in this case [NatNum1][$-41E]0 The [$-41E] doesn't interfere with the number displayed but it shouldn't be there and is very confusing because it's not in the locale data or entered by the users.
Hi Eike, your construction site. Frank
This is a side effect of the implementation to support the Thai 't' number format modifier used in Thai localized Excel versions (issue 53826). It is necessary to be able to export the NatNum1 format codes as 't' modified codes when saving to Excel format. The [$-41E] being a locale modifier freezes the locale and immunizes it against conversions during exports. It has no impact on functionality. This was the only possibility to get the required 't' change in without complex changes to other parts.
The "t" only needs to be supported on import from .xls files. There's no requirement for users to be able to input 't' themselves. Couldn't 't' just be simply implemented in the Word import filter? (I believe this is what Excel does.)
That the user is able to input a 't' modifier is just a benefit from the necessity that the number formatter must be able to understand it's syntax to correctly import Excel documents in a Thai environment. What I was referring to is the fact that to correctly export a native OOo Thai NatNum1 modifier to Excel converting it to a 't' modifier, the locale [$-41E] modifier must be present in the OOo format code. Btw, I don't understand what you mean by > Couldn't 't' just be simply implemented in the Word import filter? > (I believe this is what Excel does.) I don't think Excel uses a Word import filter ;-)
Sorry, I meant Excel filter. My point was that I don't think Excel supports "t" natively. I think it maps it on input. I don't believe Excel 2003 ever generates "t" on output (I would have to do some more checking to be sure). Suppose it was necessary to support "t" only on import, would that allow you to get rid of the extra [$-41E]?
Excel 2003 displays and stores the 't' modifier for user defined number formats if the Thai language settings are enabled. It omits the modifier when the document is loaded and saved again in other language environments, thus losing the native numerals information. We probably could get rid of the [$-41E] if export wasn't needed, but this would of course also break roundtrip conversion of Excel documents. A better approach would be a specialized export conversion that doesn't use the format code string but works on tokens instead. This isn't possible with the current implementation though and requires more changes.
Correct me if I'm wrong, does this mean that :- When I want to format a number/date as Thai native numeral inside Calc (not mention about importing from Excel), I have to put both [NatNum1] and [$-41E] in the format code. Otherwise, the conversion to Excel will not function correctly - it'll loose the native numeral format. This means I must tell Thai users to always do so (both). It must be stated in Thai OOo user manuals.
Reset assigne to the default "issues@openoffice.apache.org".