Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Socket::getaddrinfo and localized error messages on Windows

by syphilis (Archbishop)
on Apr 23, 2022 at 13:58 UTC ( [id://11143232]=note: print w/replies, xml ) Need Help??


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

I'm not sure how (if) this helps but, with the same build of 64-bit Strawberry Perl-5.32.1 on Windows 7, this is what the same snippet of code outputs for me:
C:\_32\pscrpt\socket>perl try.pl $gaiErr="The support for the specified socket type does not exist in t +his address family. " (10044) $osErr="Result too large" (34) $extErr="The support for the specified socket type does not exist in t +his address family" (10044)
No truncation of $gaiErr, a different $osErr, and effectively the same $extErr.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Socket::getaddrinfo and localized error messages on Windows
by Yaribz (Beadle) on Apr 23, 2022 at 15:47 UTC

    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 !

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11143232]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found