in reply to Re: Socket::getaddrinfo and localized error messages on Windows
in thread Socket::getaddrinfo and localized error messages on Windows

Yes in your case the localized error message generated in this example doesn't use any non ASCII characters, so the bug isn't triggered. Depending on the system language (and the system ANSI code page) I guess it can be easier or harder to trigger the bug. However for some reason in your case $gaiErr contains a dot and an extra space at the end of the string compared to $extErr.

Thanks anyway for trying to reproduce !

  • Comment on Re^2: Socket::getaddrinfo and localized error messages on Windows

Replies are listed 'Best First'.
Re^3: Socket::getaddrinfo and localized error messages on Windows
by syphilis (Archbishop) on Apr 24, 2022 at 01:10 UTC
    However for some reason in your case $gaiErr contains a dot and an extra space at the end of the string compared to $extErr

    Yes, I noticed that, too ... and wondered ...

    I think you should create an issue of this.
    If the problem turns out to be in 'cpan/Socket' (in the perl source) you would then have to file a bug report against the Socket distro, but I'm guessing that the problem lies in some windows-specific section of the perl source that is outside of 'cpan/Socket' - more likely in the 'win32' folder of the perl source.

    Of course, you might yet receive some helpful responses here, explaining the nature of the problem.

    Cheers,
    Rob
      I think you should create an issue of this.

      Actually I did create an issue regarding this, just a few hours after I created my initial post here on PM, because I realized it was likely an actual bug.

      I created it in the Socket module bug tracker because I though the related code was in the xs code of this module.

        I created it in the Socket module bug tracker because I thought the related code was in the xs code of this module.

        Cool .. that's a good place to start.
        However, it's a bit tricky. That "related code" that you've indicated is inside an "#ifdef HAS_GETADDRINFO" block, and I don't know if "HAS_GETADDRINFO" is defined for your build of perl. On my 64-bit StrawberryPerl-5.32.1, I have:
        C:\> perl -V:d_getaddrinfo d_getaddrinfo='undef';
        Maybe "HAS_GETADDRINFO" gets defined somehow anyway, despite that Config setting ??

        Cheers,
        Rob