Detect buffer encoding with ICU