How to share a variable between ISR and main-code?
This line:
int encVal = 0;

Creates a variable local to the ISR.
If you expect that variable name to be globally accessible then you could have problems.
Even if you have declared a global variable by that name, the local version of encVal will be changed inside the ISR and then will be discarded when the ISR returns.
As Peter comments, in the global declaration it should be declared with the  volatile keyword so the compiler knows it may change at any time (changed by the ISR, in this case).