In Japanese, numbers can be written either full-width or half-width:
- Full-width: 1234567890
- Half-width: 1234567890
Nowadays in my field everyone use half-width, and using full-width is seen as a gross lack of professionalism. Unfortunately Ubuntu makes it easy to mix up full-width and half-width.
Some programs make the distinction very clear, for instance vi
:
... but other programs (most importantly firefox
) make almost no distinction:
That leads to very incompetent-looking messages. When the customers look at the message above in their Mac browsers the distinction is super-clear.
Question
How to set up Ubuntu to make it much more difficult to mistakenly type full-width numbers?
I am not sure what is the root problem, but I can imagine two strategies:
- Prevent programs from using fonts that do not make the distinction clear enough.
- Modify the input method to never input full-width numbers.
I have no idea how to implement these strategies though. Other strategies are also very welcome!
The full-width characters are typed only when you attempt to input 2-byte characters, which are mostly Asian languages, I think.
This is an example how you avoid to type in a full-width characters, especially numbers.
This is a mozc configuration panel; advanced tab from which is brought by this way.
There're many other input methods and should be set by different ways but almost always the same, e.g. Anthy or ATOK, Windows IME and etc.
The other way to force full-width numbers replaced into half-width, when your text file probably contains some mixed full- and half-width numbers.
For example, you have an uncertain text1 file looks like:
12123 1532 456
And you want to replace all the full-width numbers into half-width numbers and create a new file text2
You get:
12123 1532 456
ps. You can also replace full-width alphabet letters into half-width, that would be: