Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Funny characters in nodes (exactly zero)

by dmitri (Priest)
on Jul 08, 2007 at 22:42 UTC ( #625543=note: print w/replies, xml ) Need Help??


in reply to Re: Funny characters in nodes (exactly zero)
in thread Funny characters in nodes

Most of the characters that caused problems that I looked at can be safely ignored. They are not just linefeeds, however. What I'm afraid of is that they may be some multi-byte characters that make sense in another characters set (especially since perlmonks.org uses Latin1 and not UTF-8).
  • Comment on Re^2: Funny characters in nodes (exactly zero)

Replies are listed 'Best First'.
Re^3: Funny characters in nodes (recode)
by tye (Sage) on Jul 08, 2007 at 23:19 UTC

    Then do option 2 or 3. Option 2 is pretty simple:

    s/(\\)|([...])/ $1 ? "\\\\" : sprintf "\\%02X", chr $2 /ge; my @elements= parseXML(); s/\\(\\|..)/ length $1 == 1 ? "\\" : chr hex $2 /ge for @elements;

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://625543]
help
Chatterbox?
[1nickt]: choroba no kidding! The muscle memory alone makes it insignificant. I suppose the addition of param checking is nice. But if you are using MOo anyway you are using Type::Tiny, and you can easily use T::T for params in regular methods.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2017-11-24 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (349 votes). Check out past polls.

    Notices?