If you can change the original hash, I suggest this code snippet, which deletes entries with the non-utf8 keys and reuses the values for the utf8-version key.
for (keys %oldhash) { # change key and keep the value $oldhash{utf8_on($_)} = delete $oldhash{$_}; } call_pyfunc(\%oldhash);
In reply to Re: How to convert hash keys to utf8
by hexcoder
in thread How to convert hash keys to utf8
by mpersico
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |