Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: utf8 "\xB7" does not map to Unicode at /usr/local/bin/бибс/об‰ line 112.

by graff (Chancellor)
on Nov 07, 2015 at 03:16 UTC ( [id://1147158]=note: print w/replies, xml ) Need Help??


in reply to Re^4: utf8 "\xB7" does not map to Unicode at /usr/local/bin/бибс/об‰ line 112.
in thread utf8 "\xB7" does not map to Unicode at /usr/local/bin/бибс/об‰ line 112.

Looking specifically at this snippet: Is the "open" statement the very first line of your script? (In other words, is the output that you showed based on running a script that contained exactly those 6 lines of code and nothing else?) Of course, I expect that you would have at least assigned values to $put, $tip and $kriteriy. (But maybe these values are not what they should be in order for "find" to work the way you expect?)

In any case, I suspect that you didn't include the "binmode" statements that I recommended in my early reply -- or if you did, then your file names are not encoded the way you think they are.

Some other points:

  • If you don't want any output to go to your terminal, then you should redirect STDOUT and STDERR to output files on the command line when you run your script.
  • The output you showed did not come from the code you posted here. The best way to get help is to post a minimal BUT COMPLETE script, together with the output created BY THAT PARTICULAR complete script.
  • There's nothing strange about "ZNAK" showing up first in the output, because that is the first thing to be printed by your code. The output of the "find" command is being treated as input to your script, which is read via the "$vrm" file handle.
As for using the "qx" operator, that's certainly an option (instead of using the pipeline "open") - you just have to make sure that you Encode::decode the string returned by "qx", so that perl can treat it properly as utf8 data.
  • Comment on Re^5: utf8 "\xB7" does not map to Unicode at /usr/local/bin/бибс/об‰ line 112.

Replies are listed 'Best First'.
Re^6: utf8 "\xB7" does not map to Unicode at /usr/local/bin/бибс/об‰ line 112.
by nikolay (Beadle) on May 06, 2016 at 10:27 UTC

    Hello. Concerning the output on mistakes in Russian.

    I put to a script:

    use utf8::all; binmode STDOUT, 'utf8'; binmode STDERR, ":encoding(UTF-8)"; print 5

    -- to produce error because of absence of ; after print. PERL gave me on running:

    Can't modify constant item in scalar assignment at /япио/1.pl line 5, near "';"

    So, the binmode directives do not help.

    Thank you for your answers.

      Your script runs ok for me, Russian or not. I don't see any assignment there. Haven't you omitted the last line when pasting here?

      I tried to create a file with non-Latin1 name with a syntax error, Perl seems to report the path correctly in the error message even without any unicode related settings. What's your OS, locale, terminal settings?

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-19 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found