Thread overview | |||||
---|---|---|---|---|---|
|
April 20, 2006 dchar issues? | ||||
---|---|---|---|---|
| ||||
Hi.. I think these are bugs, but I'm not entirely sure: #void main() { # char[] t; #// t ~= '我'; // Error: Can only append to dynamic arrays, not char[] ~= wchar # t ~= "我"; # char[] r; # foreach(dchar d; t) { # int rel = r.length; # r ~= d; # if (d>127) assert(r.length-rel>1); // fails # } # assert(r.length == t.length); // fails #} First of all: since I'm allowed to write "r ~= dchar", I should also be allowed to do the same with a constant, '\u6211'. This probably got posted before. The second one seems similar: it compiles without complaint, but it's not correctly appending the 2-byte dchar to the char[]. These issues seem too common not be known. Should I post them in bugzilla? L. |
April 20, 2006 Re: dchar issues? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lionello Lunesu | Lionello Lunesu wrote:
> These issues seem too common not be known. Should I post them in bugzilla?
>
> L.
Rule of thumb: if it is not in the Bugzilla, and it is a bug, post it in the Bugzilla.
So I would guess, yes.
|
Copyright © 1999-2021 by the D Language Foundation