Error in input check, not full or half-width

Asked 2 months ago, Updated 2 months ago, 3 views

I'm studying validation checks with a live PHP without using a framework, but when I check input errors on the screen, generally speaking, "Error if it's not full-width or half-width" means an error if a model dependent character is entered.

php

2022-09-30 14:07

1 Answers

In the 20th century, Shift-JIS and EUC were the main coding methods for "Japanese Kanji."In those days, half-width means 1 byte, full-width means 2 bytes.Also, NEC PC98 and IBM PC/AT had different character sets and had different model-dependent characters.

In the 21st century, the character set is now switched to UTF-8 and the old half-width full-width is almost meaningless (UNICODE's East_Asian_Width is almost undistinguished) and there is no longer a "model dependent character" (UNICODE's version can be garbled)

So if you want to answer,

  • There was a time when we distinguished between full-width, half-width, and model-dependent characters (20th century)
  • In the 21st century, that's no longer the case
  • The meaning and content of validation are inevitably different

Therefore, the "validation" textbook or reference book is too old to be modern.I would like to refer to a different document.


2022-09-30 14:07

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.