New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get Unicode to work with backticks #22080
Comments
This isn't Perl's fault.
This can be reproduced in a shell:
Consider using something like Net::DNS instead. PS. If you really have to do this, there are a few ways to simulate a TTY. |
Ah. Given the description I agree it's not a perl problem. Though it is not only Created a new bug: https://gitlab.isc.org/isc-projects/bind9/-/issues/4637 |
P.S. Thanks for the fast and helpful response. That's really seldom. |
P.P.S. The bind ticket shows what's the normal reaction I receive for tickets: That's not a bug! That's intended! Use it this (also non working) way! Was so refreshing to get a proper reaction once even if it only pointed to the real problem. I do so many upstream bugreports for openSUSE packaging and it's tiring. It's no wonder many packagers don't report fixes upstream at all... |
Passing commandline arguments in UTF-8 via backticks seems not to work at all.
The command
perl -e 'use utf8; print qx/host stöcker.eu/;'
always returns "Host stöcker.eu not found: 3(NXDOMAIN)" instead of the correct answer (which is interesting, as the output is readable, so the encoding somehow seems to match, but not fully).
The similar command
perl -e 'use utf8; system("host stöcker.eu");'
works as expected.
I tried many different variants with -C argument on commandline or
use open ":std", ":encoding(UTF-8)"
, usingencode("utf-8", ...)
and so on. Nothing really changes the behaviour.Following line works, but that's no option as this is only a reduced example of a longer script which needs proper utf-8.
perl -e 'print qx/host stöcker.eu/;'
I searched many websites and documentation, but found no switch or setting to change it, so I think it's a bug.
Perl configuration
I'm using Perl 5.38 on openSUSE Tumbleweed (also tried perl 5.34 on Ubuntu):
The text was updated successfully, but these errors were encountered: