On Friday, 29 December 2017 at 18:13:04 UTC, H. S. Teoh wrote:
If the problem is in readln(), then you probably need to read
the input in binary (i.e., as ubyte[]) and convert it manually.
Could you kindly explain how I can read console input into binary
ubyte[]?
On Friday, 29 December 2017 at 18:13:04 UTC, H. S. Teoh wrote:
On Fri, Dec 29, 2017 at 10:35:53AM +, Andrei via
Digitalmars-d-learn wrote:
This may be endurable if you write an application where
Russian is only one of rare options, and what if your whole
environment is totally Russian?
On Wednesday, 3 January 2018 at 09:11:32 UTC, thedeemon wrote:
Windows API contains two sets of functions: those whose names
end with A (meaning ANSI), the other where names end with W
(wide characters, meaning Unicode). The sample uses TextOutA,
this function that expects 8-bit encoding.
On Friday, 29 December 2017 at 11:14:39 UTC, zabruk70 wrote:
AFAIK, Windows GUI have no ANSI/OEM problem.
You can use Unicode.
Be advised there are some problems with console UTF-8
input/output in Windows. The most usable is Win10 new console
window but I recommend to use Windows API
On Wednesday, 3 January 2018 at 09:11:32 UTC, thedeemon wrote:
you need to use TextOutW that accepts 16-bit Unicode, so just
convert your UTF-8 D strings to 16-bit Unicode wstrings, there
are appropriate conversion functions in Phobos.
Some details:
import std.utf : toUTF16z;
...
string s =
On Wednesday, 3 January 2018 at 06:42:42 UTC, Andrei wrote:
AFAIK, Windows GUI have no ANSI/OEM problem.
You can use Unicode.
Partly, yes. Just for a test I tried to "russify" the example
Windows GUI program that comes with D installation pack
(samples\d\winsamp.d). Window captions, button
On Friday, 29 December 2017 at 11:14:39 UTC, zabruk70 wrote:
On Friday, 29 December 2017 at 10:35:53 UTC, Andrei wrote:
Though it is not suitable for GUI type of a Windows
application.
AFAIK, Windows GUI have no ANSI/OEM problem.
You can use Unicode.
Partly, yes. Just for a test I tried to
On Fri, Dec 29, 2017 at 10:35:53AM +, Andrei via Digitalmars-d-learn wrote:
> On Thursday, 28 December 2017 at 18:45:39 UTC, H. S. Teoh wrote:
> > On Thu, Dec 28, 2017 at 05:56:32PM +, Andrei via Digitalmars-d-learn
> > wrote:
> > ...
> > The string / wstring / dstring types in D are
On Friday, 29 December 2017 at 10:35:53 UTC, Andrei wrote:
Though it is not suitable for GUI type of a Windows application.
AFAIK, Windows GUI have no ANSI/OEM problem.
You can use Unicode.
For Windows ANSI/OEM problem you can use also
https://dlang.org/phobos/std_windows_charset.html
On Thursday, 28 December 2017 at 18:45:39 UTC, H. S. Teoh wrote:
On Thu, Dec 28, 2017 at 05:56:32PM +, Andrei via
Digitalmars-d-learn wrote:
...
The string / wstring / dstring types in D are intended to be
Unicode strings. If you need to use other encodings, you
really should be using
you can just set console CP to UTF-8:
https://github.com/CyberShadow/ae/blob/master/sys/console.d
On Thu, Dec 28, 2017 at 05:56:32PM +, Andrei via Digitalmars-d-learn wrote:
> There is one everlasting problem writing Cyrillic programs in Windows:
> Microsoft consequently invented two much different code pages for
> Russia and other Cyrillic-alphabet countries: first was MSDOS-866 (and
>
12 matches
Mail list logo