patch 8.1.0970: text properties test fails when 'encoding' is not utf-8

Problem:    Text properties test fails when 'encoding' is not utf-8.
Solution:   Compare with original value of 'encoding'. (Christian Brabandt,
            closes #3986)
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 311f30f..5ea5517 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -518,7 +518,8 @@
 
 " screenshot test with textprop highlighting
 funct Test_textprop_screenshots()
-  if !CanRunVimInTerminal() || &encoding != 'utf-8'
+  " The Vim running in the terminal needs to use utf-8.
+  if !CanRunVimInTerminal() || g:orig_encoding != 'utf-8'
     return
   endif
   call writefile([