https://issues.dlang.org/show_bug.cgi?id=12990 this?
On Monday, 3 November 2014 at 19:37:20 UTC, Ivan Kazmenko wrote:
Hi!
The following code does not correctly handle Unicode strings.
-
import std.stdio;
void main () {
string s;
readf (%s, s);
write (s);
}
-
Example input (Test. in cyrillic):
-
Тест.
-
On Monday, 3 November 2014 at 20:03:03 UTC, Ali Çehreli wrote:
On 11/03/2014 11:47 AM, Ivan Kazmenko wrote:
On Monday, 3 November 2014 at 19:37:20 UTC, Ivan Kazmenko
wrote:
readf (%s, s);
Worth noting: this reads to end-of-file (not end-of-line or
whitespace),
and reading the whole file
On Monday, 3 November 2014 at 20:10:02 UTC, Gary Willoughby wrote:
On Monday, 3 November 2014 at 19:47:17 UTC, Ivan Kazmenko wrote:
So, if there is an idiomatic way to read the whole file into a
string which is Unicode-compatible, it would be great to learn
that, too.
Maybe something like
On Tuesday, 4 November 2014 at 11:46:24 UTC, Kagamin wrote:
https://issues.dlang.org/show_bug.cgi?id=12990 this?
Similar, but not quite that. Bugs 12990 and 1448 (linked from
there) seem to have Windows console as an important part of the
process. For me, the example does not work even
On Tuesday, 4 November 2014 at 13:01:48 UTC, anonymous wrote:
On Monday, 3 November 2014 at 19:37:20 UTC, Ivan Kazmenko wrote:
Hi!
The following code does not correctly handle Unicode strings.
-
import std.stdio;
void main () {
string s;
readf (%s, s);
write (s);
}
On Tuesday, 4 November 2014 at 18:09:48 UTC, Ivan Kazmenko wrote:
On Monday, 3 November 2014 at 20:10:02 UTC, Gary Willoughby
wrote:
On Monday, 3 November 2014 at 19:47:17 UTC, Ivan Kazmenko
wrote:
So, if there is an idiomatic way to read the whole file into
a string which is
Hi!
The following code does not correctly handle Unicode strings.
-
import std.stdio;
void main () {
string s;
readf (%s, s);
write (s);
}
-
Example input (Test. in cyrillic):
-
Тест.
-
(hex: D0 A2 D0 B5 D1 81 D1 82 2E 0D 0A)
Example output:
-
On Monday, 3 November 2014 at 19:37:20 UTC, Ivan Kazmenko wrote:
readf (%s, s);
Worth noting: this reads to end-of-file (not end-of-line or
whitespace), and reading the whole file into a string was what I
indeed expected it to do.
So, if there is an idiomatic way to read the whole
On 11/03/2014 11:47 AM, Ivan Kazmenko wrote:
On Monday, 3 November 2014 at 19:37:20 UTC, Ivan Kazmenko wrote:
readf (%s, s);
Worth noting: this reads to end-of-file (not end-of-line or whitespace),
and reading the whole file into a string was what I indeed expected it
to do.
So, if there
On Monday, 3 November 2014 at 19:47:17 UTC, Ivan Kazmenko wrote:
So, if there is an idiomatic way to read the whole file into a
string which is Unicode-compatible, it would be great to learn
that, too.
Maybe something like this:
import std.stdio;
import std.array;
import std.conv;
string
11 matches
Mail list logo