my code retrieves the content of a web page as a string and passes it on to a function. But it seems the string is suddenly empty within the function. I get the output:
Sorry, new in C++. I came from python and there I have already transferred strings with several gigabytes as parameters. What is the problem with more than 64 k in C++? I use an ESP32.
And you're burning almost half of that in two Strings. Strings that I imagine are being assembled byte by byte in the library. Dollars to donuts you've fragmented the living daylights out of the heap, leaving myriad tiny chunks of memory that can't be reused because garbage collection and heap consolidation aren't a thing in micro land. You've simply run out of usable RAM.
Which is the long winded way of saying: "The String class should be avoided like the plague for this very reason."
With a few exceptions, if any allocation fails, it does so silently. It is suspicious that the GET resulted in a string just under the limit: A:65204. Is that how big it actually is? The URL doesn't seem to work for me; I get
<p>Die angeforderte Seite kann nicht angezeigt werden.</p>
<br>
<p>The requested page cannot be displayed.</p>
No, they're a slightly intelligent bunch of bytes; assumed in some cases elsewhere to be UTF-8. But not in the class itself; e.g. length is the number of bytes, not Unicode characters.
String x = "È É Ê Ë";
Serial.println(x.length()); // 4 * 2 + 3 --> 11, not 7