Blog

Check a UTF-8 byte limit with the character counter

Screenshots show how to check a 24-byte UTF-8 limit for a CSV field name, find what fits without splitting an emoji, and shorten the text to keep the emoji.

English interface showing seven characters with whitespace, six without, and 27 UTF-8 bytes.

A CSV importer allows up to 24 UTF-8 bytes in a field name. The proposed text 開発 チーム👩‍💻 contains seven characters including the space, but takes 27 bytes. Open the character counter to see what fits before editing the text.

Find the beginning that fits in 24 bytes

  1. Paste 開発 チーム👩‍💻 into Text to count. Check for seven characters with whitespace, six without, and 27 UTF-8 bytes.
  2. Enter 24 in Byte limit (optional).
  3. The original text is three bytes over the limit. The prefix field shows 開発 チーム. To use it, select and copy it. The original text with the emoji stays in the input.
English interface showing the 24-byte limit, a three-byte excess and the prefix 開発 チーム.
The prefix takes 16 bytes. The emoji 👩‍💻 counts as one character made of several code points and takes 11 bytes. Only eight bytes remain, so the tool stops before the emoji and keeps it intact.

Shorten the text and keep the emoji

  1. Keep the limit at 24 and replace the text in the first field with 開発班👩‍💻.
  2. The revised text takes 20 bytes, leaving four. The prefix field now shows the entire text. Copy it to the destination and check that it is accepted.
English interface showing 開発班👩‍💻 in full, with 20 bytes used and four remaining.
Shortening the Japanese wording for “development team” leaves room for the emoji.

Count the field value as UTF-8. To measure the whole CSV, including delimiters and quotes added on export, check the saved file. Pasted line breaks count as one byte (LF), whereas CRLF in the saved file takes two bytes per line break. Follow the rules of the importer if it uses another encoding or character counting method.