Utf8 converter is missing in HostTextConv.

Usage of the framework, compiler and tools

Re: Utf8 converter is missing in HostTextConv.

Postby Josef Templ » Wed Jul 31, 2019 5:06 pm

I am not sure that this loop is correct with respect to handling the very last character.

Code: Select all
      ReadChar(r, ch);
      WHILE ~r.rider.eof DO
         ReadChar(r, nch);
         IF (ch = CR) & (nch = LF) THEN ReadChar(r, nch)
         ELSIF ch = LF THEN ch := CR
         END;
         wr.WriteChar(ch);
         ch := nch;
      END;


- Josef
Josef Templ
 
Posts: 227
Joined: Tue Sep 17, 2013 6:50 am

Re: Utf8 converter is missing in HostTextConv.

Postby Zinn » Fri Aug 02, 2019 2:45 pm

I checked my implementation once again and everything is alright. The last character is handle correctly.
- Helmut
Zinn
 
Posts: 73
Joined: Mon Nov 24, 2014 10:47 am

Re: Utf8 converter is missing in HostTextConv.

Postby Josef Templ » Tue Aug 06, 2019 6:12 am

yes, it is a bit tricky, but it should work.

- josef
Josef Templ
 
Posts: 227
Joined: Tue Sep 17, 2013 6:50 am

Previous

Return to Common questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron