Garbage on software serial

I am getting always all kinds of garbage when printing data to serial .
I have an mcu connected with software serial to some wifi module.
than i send data to the module and i print what i have sent in the hardware serial . i should get exactly what i send, but i get garbage :

wifiSerial.println("sv:listen(80,function(c)");
    delay(3750);
    checkme();
    wifiSerial.println("c:on(\"receive\", function(c, pl) print(pl) end)");
    delay(3750);
    checkme();
wifiSerial.println("c:send(\"HTTP/1.1 200 OK\r\")");
    delay(3750);
    checkme();


void checkme()
{
           

         //clear
           for(int k=0;k<500;k++)
                Wificontent[k]=(char)0;
           readWifiindex=0;
  
        
 
      while( wifiSerial.available()    ) 
        {   
             
             Wificontent[readWifiindex]=wifiSerial.read();
             
             readWifiindex++;
             delay(10);                  
        } 
         Serial.println(Wificontent);
       
 
        
}

I get this :

sv=net.createServer(net.TCP)
> sv:listen(80,function(c)
>> 
c:܉����, function(c, pl) print(pl) end)
>> 
����"HTTP/1.1 200 OK")
>>

Post ALL of your code.

           for(int k=0;k<500;k++)
                Wificontent[k]=(char)0;

Do you really have enough memory for a 500 element array? What type IS the array?