http://www.perlmonks.org?node_id=551161


in reply to Re: What to do when converting Excel-supplied data to Unicode
in thread What to do when converting Excel-supplied data to Unicode

That's an interesting way of doing it, and I prefer the fact the data is fixed closer to the source.... I do use my Parsing module (which does use Spreadsheet::ParseExcel) for some stuff other than extraction to XML, so this is probably worth doing. I think I'll integrate my daft special case fixes with this Formatter class and call it Correct. It's probably also worth looking at putting in some code to display dates as "dd mmm yyyy" or "YYYY-MM-DD" too....
cheers!

davis
Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.
  • Comment on Re^2: What to do when converting Excel-supplied data to Unicode

Replies are listed 'Best First'.
Re^3: What to do when converting Excel-supplied data to Unicode
by bpphillips (Friar) on May 23, 2006 at 15:39 UTC
    I'd be interested to know if my specific solution makes the "special case" code unnecessary. IIRC, the data that is outside of ISO-8859-1 is encoded by Excel as UTF-16 (Big Endian I think) which would mean that everything would be valid UTF-8 data coming out -- without having to hardcode a list of search-and-replace operations for specific characters.

    -- Brian

    P.S. - By the way, my specific experience was with Excel 2003. I'm guessing older versions of the file format may have handled things differently.