Strings being set to €

It is happening after the 5th execution of some code... why might this happen please?

How the Hell should we know?

AWOL:
How the Hell should we know?

Ha fair enough

Beakie:
It is happening after the 5th execution of some code... why might this happen please?

A bug? Or bad luck? I am a muggle, no magic without code!

Here is the project. It is a basic webserver (for ethernet shield) taking in requests, parsing the httpheader and returning a page using structs.

thanks

WebServer.zip (4.1 KB)

Some oddities in your code:

char* HTMLEncode(char* _Text)

{
return _Text;
  char cReturn[300];
// [...]
return cReturn;
}

Well apart that you return the _Text directly and skipping the rest of the code, supposing you do not return, the fact that you allocate a string on the stack, and then you return the pointer to that same string is potentially dangerous and can cause very difficult bugs to track. After return from the function the stack is lowered and other functions that will use the stack later will destroy the content.
So, unless you don't declare cReturn as static (so the memory will be allocated statically, but bear in mind that the Arduino has some very limited SRAM) you will get spurious errors.

HTH
Juergen