I’m reading in an xml file from a website and when I convert it to a plain text file, I’m getting an invalid character (black diamond with a question mark) between some words when viewed in a text editor. If I just go to that web page and save it as source, the character is a carriage return. I need to replace that with a space. Nothing I’ve tried so far has worked, though…
[code]CR = &u0D
LF = &u0A
CRLF = &u0D + &u0A
lineArray(i) = ReplaceLineEndings(lineArray(i)," “)
lineArray(i) = lineArray(i).replaceAll(CR,” “)
lineArray(i) = lineArray(i).replaceAll(LF,” “)
lineArray(i) = lineArray(i).replaceAll(CRLF,” ")[/code]
If I select that black diamond and do a hex dump in Text Wrangler, I get this…
0000: FD FF
So I also tried
lineArray(i) = lineArray(i).replaceAll(&uFDFF," ")
but nothing seems to replace that bad boy.