In principle a cleaner implementation is possible in luatex (without using
active characters), but I am not completely sure about this. It will be
better to handle this as part of \mnum macro.
Hm, can you explain this a bit ?
Currently ConTeXt already checks if '.' is part of a complete number or
not as part of the export macros. For example:
\m{x + 1.25y = 3.5}
exports as
𝑥+1.25𝑦=3.5
Notice that 1.25 is part of a single tag.
In contrast, if you use comma as a math delimiter, then the export
function does not recognize the number correctly.
\m{x + 1,25y = 3.5}
exports as
𝑥+1,25𝑦=3,5
However, we do have a \mn macro (math number) to tag numbers. So you can
type
\m{x + \mn{1,25}y = \mn{3,5}}
which exports as
𝑥+1,25𝑦=3,5
So, if we want to recognize ',' as a decimal separator, two solutions are
possible in MkIV. The first is to build upon the existing export code that
recognizes '.' as a decimal separator (to figure out the contents of the
<mn> tag) to also recognize ',' as a decimal separator;
The drawback of such an approach is that if you are in the habit of not
adding a space after a comma, for example writing "Let $\naturalnumbers$
denote the set $\{1,2,3,\dots\}$ of natural numbers..." then you will get
wrong output.
So, an alternative option is to ask the user to tag all numbers with \mn.
Then, the \mn{...} macro can redefine the comma so that the spaces around
it match its use as a decimal separator.
Aditya