Utf8 converter is missing in HostTextConv.

Usage of the framework, compiler and tools
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Utf8 converter is missing in HostTextConv.

Post by Josef Templ »

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
Zinn
Posts: 123
Joined: Mon Nov 24, 2014 10:47 am
Location: Frankfurt am Main
Contact:

Re: Utf8 converter is missing in HostTextConv.

Post by Zinn »

I checked my implementation once again and everything is alright. The last character is handle correctly.
- Helmut
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Utf8 converter is missing in HostTextConv.

Post by Josef Templ »

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

- josef
Post Reply