Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Google Weather for dwm

by ww (Archbishop)
on May 25, 2011 at 02:17 UTC ( #906591=note: print w/replies, xml ) Need Help??


in reply to Google Weather for dwm

Nice idea, and nearly there... I think.

However, executing the script (Win32) with the default codepage for US yields:

Malformed UTF-8 character (unexpected continuation byte 0xb5, with no +preceding start byte) at (eval 27) line 7. Malformed UTF-8 character (unexpected continuation byte 0xb5, with no +preceding start byte) at (eval 27) line 19. Malformed UTF-8 character (unexpected continuation byte 0xb5, with no +preceding start byte) at (eval 27) line 34. Malformed UTF-8 character (unexpected continuation byte 0xb5, with no +preceding start byte) at (eval 27) line 34. [19┬░(25┬░/13┬░)Scattered Thunders +torms|Γ26┬░/13┬░]

Switching codepages helps:

>mode con cp select=65001 Status for device CON: ---------------------- Lines: 600 Columns: 220 Keyboard rate: 31 Keyboard delay: 1 Code page: 65001 >wx.pl # Identical four "Malformed UTF-8 message [18(25/13)Scattered Thunderstorms|&#9729;26/13] /13] <p>Certainly an improvement... and given my (wilful) iggerance of code +pages and charsets, perhaps one (user) step from being as desired. Ho +wever, <c> ;echo on
or off has no apparent effect. Nonetheless, interesing project!

Replies are listed 'Best First'.
Re^2: Google Weather for dwm
by duelafn (Vicar) on May 25, 2011 at 13:00 UTC

    I get same malformed character warning (Linux), presumably due to global nature of use encoding. Removing the use encoding line and instead adding binmode( STDOUT, ":encoding(UTF-8)" ); works for me.

    Good Day,
        Dean

      Ah, perfect. I never played around with unicode before but then I discovered that it has the skull and crossbones and the biohazard symbol and chess pieces and i ching and all sorts of other fun stuff.

      ww, echo under Unix prints to standard out (in this case to add an extra newline)


      $,=qq.\n.;print q.\/\/____\/.,q./\ \ / / \\.,q.    /_/__.,q..
      Happy, sober, smart: pick two.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2021-05-07 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (91 votes). Check out past polls.

    Notices?