问题描述:

setup: Nodejs server gets data from pc com port

While reading data on pc serial com port i received following text stream:

[13;27HF [13;27H [1mF [22m [27m [13;31H44 [13;31H [1m44 [22m [27m [13;37H [22m [27m [13;37H [13;46HPTORDR [13;46H [1mPTORDR [22m [27m [13;55HCR [13;55H [1mCR [22m [27m [13;62HF419152 [13;62H [1mF419152 [22m [27m [13;75HSL [13;75H [1mSL [22m [27m [24;00H [2K%CHANGE_CLASS, Change of class - Endorsement required [22m [27m

Is it possible to encode/decode this message?

网友答案:

Those are ANSI escape codes. You may be able to use node-ansiparser.

相关阅读:
Top