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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Thank you, frozenwithjoy, for your reply. I appreciate it.

To get things started, I was having major issues until I changed your two instances of encoding(UTF-8) to utf8.

My use of :encoding(UTF-8) instead of :encoding(utf8) is intentional and purposeful.

Next, are you sure you want \x{feff}?

I'm absolutely sure. It's the Unicode byte order mark, and it's vital to my test because the real CSV files I must process invariably have the byte order mark in them, encoded in UTF-8 (EF BB BF).

When I get rid of it, I start getting things quoted: … also, it gets rid of the weird þ characters.

This doesn't happen for me. I get the same unhelpful results regardless of the presence or absence of the Unicode byte order mark. What versions of Perl and Text::CSV_XS are you using?

One more thing, your input file isn't formatted consistently... There are some /n and double \x{fe}\x{fe} characters where I don't think you intended them to be.

Those literal newlines and Latin small thorns (þ) are intentional and purposeful. They're vital to my test.

Jim


In reply to Re^2: Non-ASCII Characters As Separators/Quotes/Escapes When Using Text::CSV_XS by Jim
in thread Non-ASCII Characters As Separators/Quotes/Escapes When Using Text::CSV_XS by Jim

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found