add codecs unittest
merge and resolve conflict