zsh supports variable names with Unicode characters (if the multibyte option is set), but printenv (at least GNU's version 8.23 thereof) doesn't seem to be able to handle such variable names.For example,% export BANANAS=% export =BANANAS% /bin/echo -e $BANANAS\n$BANANAS...but1% printenv | grep BANANASBANANAS=\203\260\203\252\203\252=BANANAS% printenv --version | head -1printenv (GNU coreutils) 8.23Is there an alternative to printenv that is capable of handling Unicode in variable names?  (For portability reasons, an all-zsh solution would be vastly preferable.)1 Full disclosure: when I pasted the output of printenv | grep BANANAS from my screen into the StackExchange editor, some characters were automatically stripped off.  I've simulated these stripped off characters with strings specifying their octal codes (e.g. \203\260, etc.).  The result closely resembles the way the actual output looks on my screen.
Looking for a (preferably all-zsh) alternative to printenv that can handle Unicode in variable names
zsh;unicode
Uh, sure, just use export (works in any Bourne-style shell), or typeset -x, or a few other variants. To print specific variables, you can use typeset -p VAR1 VAR2 VAR3.These all print the values in a quoted form that can be re-read by zsh. If you want just VARIABLE=VALUE even if the value contains special characters, you can write a function:zprintenv () {  local __zprintenv_var  if [[ $# -eq 0 ]]; then set -- $(typeset +mx); fi  for __zprintenv_var do    print $__zprintenv_var=${(P)__zprintenv_var}  done}