Fullwidth and Halfwidth Characters in Chinese Forms and Spreadsheets

Wide and narrow typesetting tiles
On this page

The strings ABC123 and ABC123 look closely related, but they contain different Unicode characters. A form that accepts ordinary Latin letters and digits may reject the fullwidth version, and a spreadsheet comparison may treat them as unequal.

Chinese input methods can produce fullwidth letters, digits or punctuation alongside Chinese text. The issue is the actual characters stored in the string, not simply the font or zoom level used to display them.

Recognise common pairs

Halfwidth formFullwidth formTypical problem
AAIdentifier comparison fails
11Numeric field rejects input
,,Delimiter is not recognised
( )( )Search or parsing differs

An ordinary space and an ideographic space can also look similar in a text field. Leading or trailing spaces may add another mismatch. Inspect the full value before changing it, especially for product codes, contact fields and imported records.

Diagram: ABC123 → ABC123

Convert only the fields that need it

For a product identifier such as ABC123, converting Latin letters and digits produces ABC123. For a paragraph of Chinese prose, converting every punctuation mark may damage the intended typography. A data-entry field and a published sentence can need different handling.

The fullwidth and halfwidth converter lets you choose letters, digits, supported punctuation and spaces. Start with the categories responsible for the mismatch, then compare the result with the original.

Some changes are outside width conversion

Width conversion does not change simplified Chinese into traditional Chinese. It also does not make visually similar letters from different writing systems identical. A Latin letter and a similar-looking Cyrillic letter, for example, require a different investigation.

The Chinese full stop 。 is not simply the fullwidth counterpart of the ASCII period .. Likewise, Chinese quotation marks and book-title marks are not all covered by the fullwidth ASCII mapping. Do not assume that every punctuation difference will disappear with one width conversion.

Compare a field before and after

Take the illustrative product code ABC123. Converting only letters produces ABC123, so the digits remain fullwidth. Converting both letters and digits produces ABC123. This is why a result can look partly improved while still failing an ordinary-letter-and-digit requirement.

Now add an ideographic space before the code:  ABC123. Converting letters and digits alone leaves that leading space in place. Converting spaces changes its width, but that is not the same operation as deleting it. If the field also forbids leading spaces, trim them separately according to the receiving format's rule.

Keep leading zero digits when they belong to an identifier. Converting 001234 to 001234 should not turn it into 1234. That second change is numeric interpretation, not width conversion. In a spreadsheet, store the cleaned identifier as text when its leading zeros are significant.

Keep punctuation and file structure separate

A comma inside Chinese prose can be punctuation, while an ASCII comma in a CSV file can separate fields. Replacing every Chinese comma with an ASCII comma in a raw data file may therefore affect how the file is parsed if the field is not properly quoted. Convert a selected field's text, then export it with the file format's normal quoting rules.

Similarly, a fullwidth colon in a sentence and the colon inside a URL have different roles. A converter can change the character, but it does not decide whether the resulting URL points to the intended location. Check links and structured values in their own context rather than assuming that making punctuation narrower makes every string valid.

The visual width of a character also depends on the font. Enlarging or changing a font does not convert A into A. If the problem is an exact comparison, inspect or convert the stored text. If the problem is only appearance in a paragraph, changing the stored characters may be unnecessary.

For a large import, try a small sample containing letters, digits, punctuation and spaces before replacing an entire column. Check a known matching record, a record with a leading zero and one containing Chinese prose. The sample should reveal which categories need conversion and which should stay as written.

After the conversion, keep the original and cleaned values side by side until the receiving system has accepted the intended records. That gives you a direct way to identify a changed character without reconstructing it from memory or applying a reverse conversion that may not restore every prior choice.

A safe cleanup sequence for imported data

  1. Keep the original column or file.
  2. Identify which field has a documented format, such as a numeric code.
  3. Convert the necessary character categories in a separate copy.
  4. Check leading zeros, punctuation and spaces after conversion.
  5. Test matching or validation again before replacing the working data.

Do not normalize passwords or signed strings unless the system explicitly requires it: changing one character changes the value. For names and identifiers, keep an audit copy so the original spelling can be recovered.

If a submission also has a length limit, run the resulting text through the character counter. A width change can affect display width without reducing the number of characters.

Comments

Loading…

No comments yet.