Adding source encoding