はやみずです url-hexify-stringで使っているunreserved charactersはRFC2396を参考にして いるようですが、調べてみたところこのRFCはobsoleteでした。RFC3986を参照 するべきようです。
http://en.wikipedia.org/wiki/Percent-encoding RFC3986では、丸括弧などもエスケープすべき文字(reserved chars)になっています。 で、この問題の根本は twittering-url-reserved-p の実装ミスですね。 文字chがアルファベットであるかどうかの判定に (and (<= ?A ch) (<= ch ?z)) としていたので、Zとaの間にある [ や ] もエスケープしなくてよいとみなさ れていたわけです。 とりあえずfixしたものを hayamiz/master にコミットしておいたので、確認し てみてください。手元の環境では、[ や ] を含んだものもcurlを使って投稿で きています。 ---- Yuto Hayamizu Master's degree student at Kitsuregawa Laboratory Department of Information and Communication Engineering Graduate School of Information Science and Technology University of Tokyo From: Tadashi MATSUO <t...@mymail.twin.jp> Subject: Re: [twmode-users] 文字[もしくは文字]を含むtweetがポストできない Date: Wed, 06 Jan 2010 03:32:28 +0900 (JST) > 松尾です。 > > こちらではcurl(SSL)を使っていないのですが、問題なく > 投稿できるようです。今井さんはcurlをお使いでしょうか。 > twittering-percent-encodeで「[」や「]」が%5bや%5dにencode > されないのと関係あるのかもしれません。 > > Emacs 22.1のurl-util.elにある、url-hexify-stringを基にした > 関数で置き換えるパッチを作ってみました。 > http://github.com/hayamiz/twittering-mode/tree/master > に対する差分です。 > > twittering-mode.elのあるディレクトリで > patch -p1 < replace-percent-encode.path > を実行すれば適用できます。 > > これを適用するとエラーは収まるでしょうか。 > > --- > 松尾 直志 <t...@mymail.twin.jp> ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ twmode-users mailing list twmode-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/twmode-users