Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: XML::Writer "wrong" utf8 output

by tobyink (Abbot)
on Mar 08, 2013 at 10:11 UTC ( #1022377=note: print w/replies, xml ) Need Help??

in reply to XML::Writer "wrong" utf8 output

It's XML. Per spec, the hard tab character and 	 (and indeed 	) are defined to mean exactly the same thing.

If the output is going to be fed to an XML tool, that XML tool shouldn't care whether you've used a hard tab or whether you've used 	.

If the output is going to be fed to a non-XML tool, then why the hell are you feeding XML to a non-XML tool?! Stop doing that.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Replies are listed 'Best First'.
Re^2: XML::Writer "wrong" utf8 output
by ikegami (Pope) on Mar 09, 2013 at 18:48 UTC
    Actually, no they're not. A literal tab is considered whitespace in attribute values, whereas 	 refers to a tab. So if you want to include a tab in the attribute, you *have* to use 	.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022377]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-06-21 11:27 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (118 votes). Check out past polls.