Say I have a POSIX shell script that

1. needs to run on different systems/environments that I do not control, and
2. needs to remove the decimal separator from a string that is emitted by a program that respects the locale settings.

How can I detect the decimal separator in the most general way?