3 ms·
There are a bunch of other annoying complexities with dealing with Japanese text like halfwidth/full-width characters: depending on what you're doing you may ha
by resoluteteeth 4y ago
There are a bunch of other annoying complexities with dealing with Japanese text like halfwidth/full-width characters: depending on what you're doing you may have to account for additional stuff like ア instead of ア, or A instead of A. Ideally these wouldn't actually be used (this formatting should not be done at the character set level) but since they were included in unicode for backwards compatibility reasons, they do unfortunately get used a fair amount.
Also I guess this isn't specific to Japanese, but if you use normalization in NFD form, the modifiers like handakuten get split into separate characters (I don't think most people ever use unicode normalization but iirc mac filesystem paths are normalized so it can be really confusing when you do actually run into it).
- rester324 4y agoSomething which surprises me is that these full-width and half-width formattings are still enforced sometimes even these days in new Japanese web services. Considering that there is a seemingly easy lossless transformation path from/to these full-width/half-width alternatives, it would suffice to only support the full-width form one would think (and do some transformation as necessary without the user being involved).
- 3np 4y agoMy pet peeve is when the same form requires different format in different fields, ie full-width name but half-width phone number is required. That, and the insistent breaking of the back button.
- makeitdouble 4y agoIt's complicated. You'll want to use half-width for full number fields because html number input is half-width, and you'd need to move to the "full" alpha numeric keyboard to get full-width. Also if you allow full-width it opens the door to Chinese numerals, which you'd have to convert as well. Same thing for email address fields, allowing full-width character is user-friendly but you're pretty guaranteed to have no autocompletion on the user side, you deal with weird validations errors as some users will mistakenly convert part of the address to invalid chars, when forcing half-width pretty gets rid of that class of error altogether (assuming you don't allow full-width mail addresses in the first place. If I'm not mistaken they can be valid, including with a full-width domain) Places where there's less room for error usually allow both (like addresses for instance, where you won't run any validation on it anyway. Except on old sites and anal retentive services that will force you to go full-width sometimes)