X's 280 isn't 280 characters
If you've ever watched a 260-character draft get rejected by X, you've met weighted counting. X doesn't count characters — it counts units: most URLs are fixed at 23 regardless of length, CJK codepoints count double, and emoji have their own rules. A naive text.length is wrong often enough to be useless.
The rule set we implement
xWeightedLength in @alltwitter/contracts mirrors X's own text-configuration rules: extract URLs first and score each as the configured weight (23 for http/https), then score the remaining text with a scale that doubles CJK ranges and counts emoji by their weighted ranges. The composer shows that number live, per target platform.
One counter, three limits
The same weighted count drives three limits: 280 for X, 300 for Bluesky, 3000 for LinkedIn. When you target multiple platforms the composer takes the minimum — and the meter turns red against whichever platform is tightest, not against a single global limit.
Where this bites
Threads are the obvious casualty — a 400-word thought splits very differently once you account for link weights. The free thread-splitter tool uses the same function, so what it predicts is what the API will accept.