This patch implements "set encoding <variable-name>". The reason for this is that I wanted an easy way to reset the encoding to its previous setting within a script. Previously, my script used
save_enc = GPVAL_ENCODING
evaluate("set encoding " . save_enc)
With this patch the last line simplifies to
set encoding save_enc
Since I wasn't sure if keywords should always take precedence over variable names or not, I put both implementation into the patch.