Re: The length of strings vs. # of chars vs. sizeof

2009-11-01 Thread Daniel Keep
Rainer Deyke wrote: > Jesse Phillips wrote: >> I believe the documentation you are looking for is: >> >> http://www.prowiki.org/wiki4d/wiki.cgi?DanielKeep/TextInD >> >> It is more about understanding UTF than it is about learning strings. > > One thing that page fails to mention is that D has no

Long has no effect in expression (0)

2009-11-01 Thread Sam Hu
Given below code segment under DMD1.050 : class COM : OS { ... //public static const int OLEWHICHMK_OBJREL = 2; public static const int S_FALSE = 1; public static const int S_OK = 0 ; //Error ocurred here!! } Got the subjected error message.What does this mean? Th

Re: The length of strings vs. # of chars vs. sizeof

2009-11-01 Thread Rainer Deyke
Jesse Phillips wrote: > I believe the documentation you are looking for is: > > http://www.prowiki.org/wiki4d/wiki.cgi?DanielKeep/TextInD > > It is more about understanding UTF than it is about learning strings. One thing that page fails to mention is that D has no awareness of anything higher-l

Re: The length of strings vs. # of chars vs. sizeof

2009-11-01 Thread Rainer Deyke
Jérôme M. Berger wrote: > Rainer Deyke wrote: >> Strings are just arrays of code units. Their length is the number of >> elements (i.e. code units) they contain, just like other arrays. A code >> point may comprise multiple code units, and a logical character may >> comprise multiple code points.

Re: The length of strings vs. # of chars vs. sizeof

2009-11-01 Thread Jesse Phillips
On Sun, 01 Nov 2009 11:36:31 -0800, Charles Hixson wrote: > Does anyone just *know* the answer? (And if so, could they make the > documentation explicit?) I believe the documentation you are looking for is: http://www.prowiki.org/wiki4d/wiki.cgi?DanielKeep/TextInD It is more about understandin

Re: The length of strings vs. # of chars vs. sizeof

2009-11-01 Thread Jérôme M. Berger
Rainer Deyke wrote: Charles Hixson wrote: I've read and re-read the documentation, but I can't decide whether a UTF-8 character that takes multiple bytes to express counts as one or multiple values in length and sizeof. Sizeof seems to presume that all entries are the same length, but otherwise

Re: The length of strings vs. # of chars vs. sizeof

2009-11-01 Thread Rainer Deyke
Charles Hixson wrote: > I've read and re-read the documentation, but I can't decide whether a > UTF-8 character that takes multiple bytes to express counts as one or > multiple values in length and sizeof. Sizeof seems to presume that all > entries are the same length, but otherwise it seems to be

Re: Error: 4invalid UTF-8 sequence :: How can I catch this?? (or otherwise handle it)

2009-11-01 Thread Charles Hixson
Charles Hixson wrote: Daniel Keep wrote: Charles Hixson wrote: I want to read a bunch of files, and if the aren't UTF, then I want to list their names for conversion, or other processing. How should this be handled?? try..catch..finally blocks just ignore this error. type stuff.d import st

The length of strings vs. # of chars vs. sizeof

2009-11-01 Thread Charles Hixson
I've read and re-read the documentation, but I can't decide whether a UTF-8 character that takes multiple bytes to express counts as one or multiple values in length and sizeof. Sizeof seems to presume that all entries are the same length, but otherwise it seems to be the property I need. (I