[SOLVED] [BUG?] Re: error "Not the start of the UTF-8 sequence"
spir
denis.spir at gmail.com
Wed Apr 6 03:17:10 PDT 2011
On 04/06/2011 11:53 AM, Kagamin wrote:
> spir Wrote:
>
>> Hello,
>>
>> I get this error message:
>> Not the start of the UTF-8 sequence
>> without any other comment module name or whatnot.
>>
>> This happens when I just added toString to the following struct, and used it:
>>
>> struct Node {
>> // Note: level is equal to the number of chars up to this node.
>> // Note: a 'path' node without entry has key="".
>> char ch;
>> uint level;
>> Key key;
>> Value value;
>> ...
>> string toString() {
>> if (this.key != "")
>> return format("<%s %s:%s>", this.ch, this.key, this.value);
>> else
>> return format("<%s>", this.ch);
>> }
>> }
>>
>> Hints? I'm blocked :-(
> struct Node {
> // Note: level is equal to the number of chars up to this node.
> // Note: a 'path' node without entry has key="".
> dchar ch;
Sorry, no, nothing to do with the type. The error came from a special case
where ch='\0'. Seems some routine in dmd does not like that; but no idea where
the error comes from.
There are two points to solve, I guess:
* The error message should tell where it happens.
* '\0' is a valid code point, should pass through without error.
Denis
--
_________________
vita es estrany
spir.wikidot.com
More information about the Digitalmars-d-learn
mailing list