Metadata-Version: 2.4
Name: invisible-characters
Version: 1.0.0
Summary: Unicode blank and zero-width characters with the apps that keep each one (WhatsApp, Instagram, TikTok, Discord, Free Fire, PUBG), plus count / strip / is_blank helpers. No dependencies.
Author: Mahmoud Daghash
License: MIT
Project-URL: Homepage, https://mahmoudqq2023.github.io/invisible-characters/
Project-URL: Source, https://github.com/mahmoudQq2023/invisible-characters
Project-URL: Online tool, https://confileo.com/tools/invisible-text/
Keywords: unicode,invisible,zero-width,blank,whitespace,hangul filler,braille blank,zwsp,nickname,sanitize
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# invisible-characters

Unicode blank and zero-width characters, **with the apps that keep each one**, plus three
helpers (`count`, `strip`, `is_blank`). No dependencies.

Most "invisible character" lists stop at the code point. The useful fact is the next one:
WhatsApp strips U+200B before sending, so a message made of it is rejected as empty, while
U+2800 (Braille Pattern Blank) goes through; Instagram bios reject U+2800 but keep U+3164
(Hangul Filler); Free Fire and PUBG nicknames accept only U+3164. This package carries that
table, and the helpers let a form or a chat backend detect and remove the same characters.

```bash
pip install invisible-characters
```

```python
from invisible_characters import CHARACTERS, count, strip, is_blank, get, for_app

get("U+3164")["name"]        # 'Hangul Filler'
[c["code"] for c in for_app("whatsapp")]   # ['U+2800']

count("Mahmoud​ㅤ")  # 2
strip("Mahmoud​ㅤ")  # 'Mahmoud'
is_blank("ㅤ")            # True  — a "blank" nickname
is_blank("   ")               # True
is_blank("a")                 # False
```

`strip()` keeps U+200D (Zero-Width Joiner) by default because removing it breaks emoji
sequences; pass `keep_joiner=False` to remove it as well.

## The table

| Character | Code | Kept by | Stripped or rejected by |
|---|---|---|---|
| Hangul Filler | U+3164 | Instagram name & bio lines, TikTok nickname & bio, Free Fire, PUBG Mobile / BGMI, Discord server nickname | Instagram username, Discord username |
| Braille Pattern Blank | U+2800 | WhatsApp message, Instagram comment, Discord message, Telegram, iMessage | Instagram bio |
| Zero-Width Space | U+200B | X post & display name, iPhone Notes, HTML | WhatsApp, Telegram, iMessage |
| Invisible Separator | U+2063 | Facebook, Messenger | — |
| Halfwidth Hangul Filler | U+FFA0 | Name fields that reject U+3164 | — |
| Zero-Width Non-Joiner | U+200C | — | WhatsApp |
| Zero-Width Joiner | U+200D | (joins emoji) | — |
| Word Joiner | U+2060 | — | — |
| Byte Order Mark | U+FEFF | — | — |
| No-Break Space | U+00A0 | — | most apps trim it |

`INVISIBLE_CODE_POINTS` is a wider set of 30 code points used by the helpers: it adds the
fixed-width Unicode spaces U+2000–U+200A, U+202F, U+205F, U+3000, U+180E, U+034F, U+061C and
the Hangul jamo fillers U+115F / U+1160.

## Where the table comes from

The per-app behaviour was measured while building the invisible-text tool at
[Confileo](https://confileo.com/tools/invisible-text/), which lets a visitor copy each
character, check how many invisible code points a pasted name contains, and see the same
table per app. Apps change their filters after updates; if a row is out of date, open an
issue on the [GitHub repository](https://github.com/mahmoudQq2023/invisible-characters) with
the app, the field and the date. A JavaScript edition with the same data is on npm under the
same name.

## License

MIT
