I'm working on a MUD client and so far it's fun and works expect for what I think are Telnet Command codes that I am trying to ignore (I dont need to reply/respond)

In the text that comes to me it shows up like this: ÿü

But when I use wireshark, the bytes are :ff:fb:01

So I've been trying to do this:
Qt Code:
  1. std::string TELNETESC = "\0xFF\0xFB\0x01";
  2. std::string str = "thedatathatcamefroma_TCPSocketÿü"
  3. size_t pos = str.find(TELNETESC, 0);
  4. while (pos != std::string::npos)
  5. {
  6. str.replace(pos, TELNETESC.length(), "");
  7. pos = str.find(TELNETESC, pos + 1);
  8. }
To copy to clipboard, switch view to plain text mode 

Though that doesn't seem to get rid of the characters.

Any ideas?