Mercurial > hg > RemoteEditor > emacs
changeset 47:1d131b6064ae
*** empty log message ***
author | gongo |
---|---|
date | Sat, 23 Aug 2008 17:47:10 +0900 |
parents | 991526bc3f16 |
children | 8d73102deff6 |
files | ChangeLog |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Aug 23 17:42:25 2008 +0900 +++ b/ChangeLog Sat Aug 23 17:47:10 2008 +0900 @@ -1,5 +1,25 @@ 2008-08-23 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp> + * memo: 文字列の長さ、バイト数 + UTF-8環境で + + (length "あいうえお") => 5 + (string-bytes "あいうえお") => 15 + + なわけです。こういうとき、文字数での文字の分割はともかく、 + バイト数での分割ってのがなくて、どうしようかと悩んでたんだが、 + + (setq str (encode-coding-string "あいうえお" 'binary)) + => "\222\244\242\222\244\244\222\244\246\222\244\250\222\244\252" + + だと、 + + (length str2) => 15 + (string-bytes str2) => 15 + + となるわけだ。つまりそういうことだ(何 + length ってのは文字コードとかふまえた上での文字数なのねーまあそうか + * redit-client-sm.el (redit-client-process-filter): process-filter で受け取る文字列に 複数の REP command が連結された状態になってて