`!!encoding ? (encoding + '').toLowerCase() : 'utf8'`? That's what you use elsewhere.