Progopedia - encyclopedia of programming languages
Anders F Björklund
afb at algonet.se
Tue Nov 24 11:40:02 PST 2009
JMRyan wrote:
> I don't understand. You appear to be referring a connonical or otherwise
> previously publish version fo D. Or perhaps I misunderstood you.
I meant the canonical samples/d/hello.d as in the DMD distributions.
> I didn't use writeln() because it is not available in D1. I added a note
> about that. Looking at other examples on Progopedia, it seems that puts()
> is beyond the scope of the article.
Probably right. Same goes for adding Tango, quickly gets complicated.
>> And of course it makes a couple of assumptions such as the
>> terminal being in UTF-8. But I guess that's a Windows issue ?
>
> Actually, it makes a much safer assumption, namely that, whatever character
> set the terminal uses, it' ASCII compatible. I suppose it might have some
> trouble with an EBCDIC terminal. I suppose that's a good thing. :-) More
> troubling, I'm assuming the terminal is not UTF-16 or UTF-32. Worrying
> about this seems to be beyond the scope of the Progopedia article.
If one is echoing parameters back (which normal "hello" is not),
then there was a D problem with terminals that are not UTF-8:
# such as ISO-8859-1:
$ ./echo hallå världen
./echo
Error: 4invalid UTF-8 sequence
But it doesn't apply to this Progopedia "hello" but only to the
D "hello", so never mind me muddying up the waters in this thread.
--anders
More information about the Digitalmars-d-announce
mailing list