Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
i designed application which receives characters from serial port and print in edit control.This function working properly but whenever escape character received like 1B{2K\r} for clear line &1B[2J\r] for clear screen that time application hangs;how to manage this condition for continually data received from port?
Posted
Comments
Richard MacCutchan 18-Nov-13 9:41am    
We need to see some code; it's impossible to guess what you are doing.

1 solution

Wrong approach: instead of skipping of the escape character, find out why the application is hanging and fix the root cause of it, which certainly is not directly related with this character. Use the debugger. But when you do it, sanitize all data before showing it in the control. I have no idea why it could possibly cause any coding problem. Perhaps you would need to show your code sample and explain what is your concern. But do it only when you figure out the root cause of the problem.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900