I am evaluating expression by using `KernelLink`.

But the kernel will be suspended endless when meets a invalid escape character. `a\abc`, `\[badEscape]` for example.

So I have to filter all the invalid escape characters programmingly.

Is there a way to get all valid escape characters in *Mathematica*? `\[Beta]`,`\[Alpha]` and so forth.

This is possibly caused by not all packets are read off properly
----------


I will show the Mathematica code bellowd that you could test easily.

I'm using `EnterTextPacket` function(which communicates through WSTP) to talk with KernelLink. You could find refercence [here](http://reference.wolfram.com/language/ref/EnterTextPacket.html?q=EnterTextPacket)

**The first** case evaluates `10!`, and works well

    link = LinkLaunch[First[$CommandLine] <> " -wstp"]
    LinkRead[link]
    LinkWrite[link, EnterTextPacket["10!"]]
    LinkRead[link]
    LinkRead[link]
    LinkRead[link](*the last package*)
    LinkClose[link]
[![works well][1]][1]

we could see the last `LinkRead[link]` returned `In[2]:= ` indicates all packages read off.

**The next** case evaluates `\[BadEscape]` causes packages returned with endless. `LinkRead[link]` returned `Syntax Err` continuously.

    link = LinkLaunch[First[$CommandLine] <> " -wstp"]
    LinkRead[link]
    LinkWrite[link, EnterTextPacket["\[BadEscape]"]]
    LinkRead[link]
    LinkRead[link]
    LinkRead[link]
    ....
    (*endless*)
[![enter image description here][2]][2]
[![enter image description here][3]][3]

So I think this must be the problem. Does this make sense ?
  [1]: https://i.sstatic.net/u0AKn.png
  [2]: https://i.sstatic.net/3Ct36.png
  [3]: https://i.sstatic.net/RyOsp.png