encoding for resources