¡@

Home 

php Programming Glossary: char_size

Replacing invalid UTF-8 characters by question marks, mbstring.substitute_character seems ignored

http://stackoverflow.com/questions/8215050/replacing-invalid-utf-8-characters-by-question-marks-mbstring-substitute-charac

size strlen str substitute xEF xBF xBD ret '' pos 0 char char_size valid while utf8_get_next_char str size pos char char_size valid.. char_size valid while utf8_get_next_char str size pos char char_size valid ret . valid char substitute return ret function utf8_get_next_char.. ret function utf8_get_next_char str str_size pos char char_size valid valid false if str_size pos return false if str pos x80..