buffer: ignore case of encoding for all functions

Just be consistent for all functions in this behavior :p