Ticket #27837

Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Receiving New Line = CR appears to not work correctly

Open Date: 2012-03-15 08:18 Last Update: 2012-04-11 00:34

Reporter: (Anonymous) Owner: (None)
Type: Feature Requests Status: Open
Component: Tera Term MileStone: (None)
Priority: 5 - Medium Severity: 5 - Medium
Resolution: None

Details

When I select "CR"as new line-character in "Settings -> Terminal Settings" (hopefully translated correctly from my German version) for receiving, it appears to behave like "LF" was selected: When a CR is received, no new line is generated, only when LF is reveived. (CR+LF appear to work correct, but this generated 2 new lines when CR+LF is used as end-of-line).

In my application this is quite annoying (as both CR and CR+LF are used as end-of-line), therefore it would be great if this could be fixed. (I am using TeraTerm 4.73)

Thank you and regards,

Thomas

Attachment File List

Ticket History (3/11 Histories)

2012-03-15 08:18 Updated by: None
  • New Ticket "Receiving New Line = CR appears to not work correctly" created
2012-03-15 09:08 Updated by: maya
  • Component Update from (None) to Tera Term
Comment

Please read "New-line (receive)" section of Manual.

2012-03-19 23:21 Updated by: None
Comment

Please read "New-line (receive)" section of Manual.

Thank you very much for the clarification, I was not aware of this.

May I change this report to a "feature request"?

Like mentioned before, I have an application where both CR and CR+LF are used as end-of-lines. Would it be possible to add one of this two behaviors for receiving:

1. CR is interpreted as "new-line" (CR+LF), LF is ignored, or

2. "Auto-mode": Either CR+LF, LF+CR, LF or CR is accepted as "new-line" (CR+LF), e.g.: text CR LF CR LF text -> 2 new lines, text LF CR LF CR text -> 2 new lines, text CR CR text -> 2 new lines, text CR LF CR text -> 2 new lines

Maybe you can also hint me to where I can find this in the source-code so I can make the change myself.

Thank you,

Thomas

2012-03-27 12:20 Updated by: maya
  • Type Update from Bugs to Feature Requests
Comment

We will discuss about this request.

Here is svn repository to checkout source code. http://svn.sourceforge.jp/svnroot/ttssh2/trunk

2012-04-02 00:11 Updated by: maya
Comment

What system uses "LF+CR" as new-line?

New-line is parsed in ParseControl()#vtterm.c. If you can send a patch for auto detect, we will apply in trunk.

2012-04-09 09:10 Updated by: None
Comment

Reply To maya

What system uses "LF+CR" as new-line? New-line is parsed in ParseControl()#vtterm.c. If you can send a patch for auto detect, we will apply in trunk.

Sorry for the late reply, I just saw your reply now. Thanks for the info, I will try to implement it ASAP (however, right now I am very busy with something else, so it might take a few days...).

Regards,

Thomas

P.S.: LF+CR: I don't know, maybe some embedded system who's programmer mixed it up by mistake ;-)

2012-04-10 01:11 Updated by: tentner
Comment

Hi,

I was impatient and did it right away...

Attached you can find the patch, I hope you can accept it. According to my tests, it works fine.

I also realized that "ts->CRReceive" is also used in the ParseFirst() function in tekesc.c, I was not sure what to do about this and did not do any changes there.

Regards,

Thomas

2012-04-10 10:34 Updated by: None
Comment

One more thing: I have not (yet) updated the docu and comment in the .ini-file. Do you want me to do that or will you do it?

Regards,

Thomas

2012-04-11 00:34 Updated by: maya
Comment

How can we see the patch?

2012-04-12 09:47 Updated by: tentner
  • File receive_auto_crlf.patch (File ID: 4723) is attached
2012-04-12 09:48 Updated by: tentner
Comment

Sorry, for some reason it got not attached the first time... (Maybe forgot to hit the transmit-button?)

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login