Google Answers Logo
View Question
 
Q: Parsing a Unicode UTF-16 file in Perl / PHP ( No Answer,   2 Comments )
Question  
Subject: Parsing a Unicode UTF-16 file in Perl / PHP
Category: Computers > Programming
Asked by: uc1bear-ga
List Price: $15.00
Posted: 09 Jun 2004 10:34 PDT
Expires: 14 Jun 2004 16:41 PDT
Question ID: 358676
Hi, I have a file that the sender is sending with the extension
".CSV", although it does not open cleanly in Notepad (no line wraps,
and that square character appears).  It opens fine in XLS, and I
believe it is actually a tab delimited file that is in Unicode format.

This is confirmed by iConv.com, which says we have a ?Little-endian
UTF-16 Unicode C++ program character data? file.  We are using PHP to
process the file, and want to be able to process it, but can't find
any info on parsing such a file.  Can you tell me how?

Thanks!

uc

Request for Question Clarification by passive-ga on 14 Jun 2004 14:25 PDT
Would a Python (www.python.com) solution be accepable to you?
It seems that PHP does not have very good UTF-16 facilities, at least
upon cursory inspection, and I am not familiar enough with Perl to put
together anything dependable.
Python, on the other hand, handles Unicode natively, and is quite
efficent for text processing.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Parsing a Unicode UTF-16 file in Perl / PHP
From: crythias-ga on 09 Jun 2004 17:39 PDT
 
Is it possible to save as a "real" .csv or tab .txt from inside Excel?
Do you think you'll lose specific data in a field?
Subject: Re: Parsing a Unicode UTF-16 file in Perl / PHP
From: nandigam-ga on 09 Jun 2004 18:33 PDT
 
Hello uc1bear,

can you put any part of that file online. SO that we can give a try

Thanks
Giridhar Nandigam

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy