When dealing with enterprise customers in Japan, typically they still main legacy systems that have specific character entry requirements. One of such character entry requirement is entry of half-width katakana. Katakana is the Japanese equivalent of the alphabet and many legacy systems only support the half-width version of katakana. However, most modern mobile devices only allow entry of the full-width version of katakana (i.e. iPhone/iPad). Since the byte characters and lengths are different for full-width and half-width versions of katakana, most Japanese web applications resolve this issue by auto-converting full-width katakana characters into half-width katakana characters.
Note: You might notice that full-width katakana is wider than half-width katakana. Half-width katakana was originally meant to take a wide as an english alphabet character while full-width was meant to be as wide as traditional kanji (Japanese) characters.
The simplest way to implement this is to just implement a straight replacement of characters using search and replace. I’ve provided a sample search and replace code in a JSFiddle for those looking to see an implementation.