← Back to index
|
Original Bugzilla link
Bug 10191 – std.array.array and Unicode strings
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-05-28T03:27:40Z
Last change time
2020-03-21T03:56:34Z
Assigned to
No Owner
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2013-05-28T03:27:40Z
import std.stdio: writeln; import std.algorithm: map; import std.array: array; void main() { string a = "\u03A9\u03A9ab"; a.map!(a => "<"d ~ a ~ ">"d).writeln; a.map!(a => "<"d ~ a ~ ">"d).array.writeln; } Prints (dmd 2.063beta7): ["<Omega>", "<Omega>", "<a>", "<b>"] ["<Omega>", "<Omega>", "<a>", "<b>", "", ""] Expected output: ["<Omega>", "<Omega>", "<a>", "<b>"] ["<Omega>", "<Omega>", "<a>", "<b>"] Found by Timothee Cour:
http://forum.dlang.org/post/
[email protected]
Comment #1
by b2.temp — 2015-11-21T13:45:39Z
2.069 ok