I have retrieved a file from a web server by means of the FetchURLWithHeaders function.
The retun value from FetchURLWithHeaders should contains the substring
SCHØNHEYDER
but instead I find
SCH����NHEYDER
and
ToCharacterCode /@ Characters["SCH����NHEYDER"]
gives
{{83}, {67}, {72}, {65533}, {65533}, {65533}, {65533}, {78}, {72}, {69}, {89}, {68}, {69}, {82}}
How can I transform SCH����NHEYDER in SCHØNHEYDER and print in a text file ?
Thanks a lot !!
Utilities`URLTools`FetchURLWithHeaders
is an older, undocumented function. Have you triedURLFetch
instead? The "SCH����NHEYDER" string can not be turn into the original as the � character (65533) is used to replace an incoming character whose value is unknown or unrepresentable in Unicode. So, the original value is lost. $\endgroup$URLFetch
with the option"Headers" -> {"Content-Type" -> "text/html;charset=utf-8"}
. Could you provide an example URL to test with? $\endgroup$