Reading unicode chars..

seany via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 2 11:11:25 PDT 2014


Hi Ali, i know this example from your book.

But try to capture „ the low quotation mark, appearing in the 
All-purpose punctuations plane of unicode, with \u201e - I worte 
I am having problems with \u1FFF and up.

This particular symbol, is seen as a dchar array "\x1e\x20" - so 
two dchars, using wchar returns the same result, when I directly 
profide the symbol to the code.

SO I was thinking of using two dchars, and printing the dstring, 
the problem then is that I do not know beforehand if a particular 
character read out of the file is a pair of dchars, or a single 
dchar.

And yes, it was stream.getcw, sorry, not file.getcw(). Indeed.

Reading this character from a file (using a while loop until EOF) 
produces an â and an unknown charcter given by a question mark in 
a white polygon.





More information about the Digitalmars-d-learn mailing list