Issue 59332 - Excessive [$-41E] in Thai native number formats
Summary: Excessive [$-41E] in Thai native number formats
Alias: None
Product: Calc
Classification: Application
Component: formatting (show other issues)
Version: OOo 2.0.1
Hardware: All All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Blocks: 41707
  Show dependency tree
Reported: 2005-12-14 11:58 UTC by samphan
Modified: 2017-05-20 11:13 UTC (History)
6 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description samphan 2005-12-14 11:58:42 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

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

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.
Comment 1 frank 2005-12-14 13:21:11 UTC
Hi Eike,

your construction site.

Comment 2 ooo 2005-12-15 13:20:06 UTC
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.
Comment 3 jjc 2005-12-15 14:14:47 UTC
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.)
Comment 4 ooo 2005-12-15 14:47:50 UTC
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 ;-)
Comment 5 jjc 2005-12-15 15:39:24 UTC
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]?
Comment 6 ooo 2005-12-16 12:06:17 UTC
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.
Comment 7 samphan 2005-12-27 09:34:44 UTC
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.
Comment 8 Marcus 2017-05-20 11:13:51 UTC
Reset assigne to the default "".