Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Problem with unicode string length zsh segfaults
- X-seq: zsh-workers 25965
- From: "Kazuo Teramoto" <kaz.rag@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Problem with unicode string length zsh segfaults
- Date: Thu, 30 Oct 2008 12:03:22 -0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=3fzwc+UxTQJNdQc9+WFoWEGwN69ewaT6O93Twvcfqg8=; b=TOjVXR1tXwZJbeRV7KaUIQg7D4/q3O4rDIHko4Fzhqf+dk6LYg3WD4Lc3SJeTZFqum tVPH/GptjFmL88QnelkbAkVs7of8PdJSGjEIDQgoCEInBOzRNFV2ORj9t5FOPCJH7Fyw a9qz4NhAhGUDwrc2uxWYo2z63XCKwzrMarMfQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=fAyzYIwhQE4Y/2wzJriZIEf3oBYAIJVDDgUsdlO/g3oRjCzxunMXzRQsrY0MWR1wdJ npbo5b0qOZjJWi9MQpOwZ+rgvERNj9u5Sc6r9o6Z0/sOeRn23QzIs9oaRkOyfBfY7M9O UnhBd4ADai8bmuCcIh/wbQoCQ+VT7rGeFs1+E=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Hello!
(My first email to list, I subscribed to workers, but I send this type
of msg to workers or users?)
I'm having a problem with string size and unicode chars. I'm using
string size in my prompt theme, I'm using the following code to
calculate the string size of pwd:
${#${(%):-%~}}
But sometimes this got the number wrong e.g. I have a dir named
'~/Music/ææçè' (Yuki Kajiura composer of Noir anime soundtrack) the
code above give 13 chars but it have 12 chars (count or using "print
-Pn '%~'|wc -m" and wc -c give 20 bytes).
And if I cd on this dir my prompt get wrong by 3 chars (e.g. on a
prompt like adams2 the first line is bigger by 3 chars)
The problem is greater for a dir named 'ÐÑÑÑ ÐÐÑÐÑ ÐÐÐÐÐÐÑÐÐÐ' (Pyotr
Il'yich Tchaikovsky, Russian composer) if I cd on it and execute the
code above I get
zsh: unmatched '
zsh: parse error in command substitution
and if I try this several times (repeat this command) my zsh segfaults:
1: subst.c:222: BUG: parse error in command substitution
Program received signal SIGSEGV, Segmentation fault.
0x000000000047e4b4 in ?? ()
(gdb) bt
#0 0x000000000047e4b4 in ?? ()
#1 0x0000000000482cee in prefork ()
#2 0x00000000004843ea in ?? ()
#3 0x000000000047e694 in ?? ()
#4 0x0000000000482cee in prefork ()
#5 0x000000000042a488 in ?? ()
#6 0x000000000042c948 in ?? ()
#7 0x000000000042cce0 in ?? ()
#8 0x000000000042e02d in execlist ()
#9 0x000000000042e275 in execode ()
#10 0x000000000042e36c in runshfunc ()
#11 0x000000000042e72b in doshfunc ()
#12 0x000000000042e9b0 in ?? ()
#13 0x000000000042c604 in ?? ()
#14 0x000000000042c948 in ?? ()
#15 0x000000000042cce0 in ?? ()
#16 0x000000000042e02d in execlist ()
#17 0x000000000042e275 in execode ()
#18 0x000000000042e36c in runshfunc ()
#19 0x000000000042e72b in doshfunc ()
#20 0x0000000000487db6 in callhookfunc ()
#21 0x000000000048f593 in preprompt ()
#22 0x000000000043ee6c in loop ()
#23 0x0000000000441fe7 in zsh_main ()
#24 0x00007f9c3153c3f6 in __libc_start_main () from /lib/libc.so.6
#25 0x000000000040f939 in _start ()
--
ÂDans la vie, rien n'est à craindre, tout est à comprendreÂ
Marie Sklodowska Curie.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author