View mode: basic / threaded / horizontal-split · Log in · Help
April 06, 2011
error "Not the start of the UTF-8 sequence"
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 :-(

Denis
-- 
_________________
vita es estrany
spir.wikidot.com
April 06, 2011
Re: error "Not the start of the UTF-8 sequence"
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 :-(
> 
> Denis
> -- 
> _________________
> vita es estrany
> spir.wikidot.com
> 

    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;
April 06, 2011
[SOLVED] [BUG?] Re: error "Not the start of the UTF-8 sequence"
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
April 07, 2011
Re: [SOLVED] [BUG?] Re: error "Not the start of the UTF-8 sequence"
spir Wrote:

> >> I get this error message:
> >> 	Not the start of the UTF-8 sequence

if it's '\0', the error message is clearly incorrect, report a bug.
Top | Discussion index | About this forum | D home