Python论坛  - 讨论区

标题:[python-chinese] how to get the right byte length ofaunicodestring ?

2005年08月23日 星期二 16:33

chenzh chenzh at bhh.com.cn
Tue Aug 23 16:33:35 HKT 2005

i'm not doing things like len('tab+some characters')
but thanks anyway
----- Original Message -----
From: "Wang Kebo" <mep_ at 163.com>
To: <python-chinese at lists.python.cn>
Sent: Tuesday, August 23, 2005 5:36 PM
Subject: RE: [python-chinese] how to get the right byte length
ofaunicodestring ?


chenzh wrote:
> thanks
> to judge a unicode string's byte length,
> len('mixedstring') works well :)
>
> i am working on a script to adjust c++ comment in ms-vs,with
> tab:4,indent:4 option.
> the weird thing misled me to ask the question is, i replaced all tabs
> in a line before comment with 4 spaces, but when I copied the
> replaced line back to vs,i found its length different from the
> orginal line.
>
> still not figure it out.

tab是一个字符,而空格是4个,是这个原因吗?
__
Best Regards,

Kebo Wang


_______________________________________________
python-chinese list
python-chinese at lists.python.cn
http://python.cn/mailman/listinfo/python-chinese



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号