python-twitter should count characters not bytes.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-twitter (Debian) |
New
|
Undecided
|
Unassigned | ||
python-twitter (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I wanted to post this as a tweet "Had lighttpd installed ∴ it was running ∴ apache couldn't restart ∴ roundcube couln't be upgraded ∴ software upgrade keep complaining", notice the ∴ unicode characters.
The tweet command complained that tweet must be under 140 characters. However that *is* under 140 characters. However it is not under 140 bytes. Those unicode ∴'s are 1 character but are not 1 byte.
echo -n "Had lighttpd installed ∴ it was running ∴ apache couldn't restart ∴ roundcube couln't be upgraded ∴ software upgrade keep complaining" | wc -m
133
echo -n "Had lighttpd installed ∴ it was running ∴ apache couldn't restart ∴ roundcube couln't be upgraded ∴ software upgrade keep complaining" | wc -c
141
As proof, the twitter web interface does support this as a tweet:
http://
The error message I was getting was:
tweet "Had lighttpd installed ∴ it was running ∴ apache couldn't restart ∴ roundcube couln't be upgraded ∴ software upgrade keep complaining"
Traceback (most recent call last):
File "/usr/bin/tweet", line 116, in <module>
main()
File "/usr/bin/tweet", line 108, in main
status = api.PostUpdate(
File "/var/lib/
raise TwitterError("Text must be less than or equal to 140 characters.")
twitter.
Changed in python-twitter: | |
status: | New → Confirmed |
The problem seems to be deeper than that. In Jaunty (python-twitter 0.5), it balks at any non-ASCII characters.