PHP printf not printing, simplexml_load_string not parsing

QuestionsPHP printf not printing, simplexml_load_string not parsing
sethbeckerman5 Staff asked 17 years ago

I have some data that won't printf….

echo works, but not printf

There is data in the string, also simplexml_load_string won't parse the string.

There is some binary or invisible character that I cannot see and can't get the ordinal value for that is causing printf to fail as well as most other string functions in PHP.

Clearly this is an encoding issue, however, I don't know how to find out what it is so I can properly encode/decode it.

Clearly there is data there, I know it's there if I loop over every single character, however, I don't where to go from there.

[UPDATE]
This is weird because the ordinal value is outside of the typical ASCII range.

ord($buffer[$i]) = 1610

it is a combo of a DLE and LF characters. Not sure how it got there or why. Or what it was supposed to be, the data on either side is valid and the location for this is quite odd.

think <offending char here>0,000


View on Stack Overflow