On Tuesday, 18 December 2012 at 00:29:56 UTC, Jeremy DeHaan wrote:
I was playing with unicode strings the other day, and have been
searching for a way to correctly write unicode to the console.
If I try something like:
dstring String = さいごの果実;
writeln(String);
All I get is a
On Tuesday, 18 December 2012 at 00:29:56 UTC, Jeremy DeHaan wrote:
I was playing with unicode strings the other day, and have been
searching for a way to correctly write unicode to the console.
If I try something like:
dstring String = さいごの果実;
writeln(String);
All I get is a
I was playing with unicode strings the other day, and have been
searching for a way to correctly write unicode to the console.
If I try something like:
dstring String = さいごの果実;
writeln(String);
All I get is a bunch of nonsense as if it converts the dstring
into a regular
Jeremy DeHaan:
Is it possible to write the unicode string to the console
correctly?
What is your operating system?
On oldish Windows you have to set the console to Unicode or
nearly Unicode. I don't know about Windows7/8.
Bye,
bearophile
I suggest you use string instead of dstring, because utf-8
(string) has better output support than utf-32 (dstring), and
both support the complete unicode character set.
If string doesn't work, the question is: Windows or Linux?
On Windows, the api call SetConsoleOutputCP will help
On Tue, Dec 18, 2012 at 01:29:55AM +0100, Jeremy DeHaan wrote:
I was playing with unicode strings the other day, and have been
searching for a way to correctly write unicode to the console.
If I try something like:
dstring String = さいごの果実;
writeln(String);
All I get is
@Adam D. Ruppe
I suggest you use string instead of dstring, because utf-8
(string) has better output support than utf-32 (dstring), and
both support the complete unicode character set.
Tried string and wstring. Both had the same results as my dstring.
On Windows, the api call
On Tuesday, 18 December 2012 at 00:59:12 UTC, Jeremy DeHaan wrote:
How/Where would I call this?
Right at the beginning of your main, but after trying it, I don't
think this is going to fix your problem anyway... I think it is
fonts. But:
import std.stdio;
extern(Windows) int