Add encoder version check and tests.