in reply to ASCII characters not displayed correctly in csv file

You should look at what's stored in your DB. Chances are that the entity encoding is put there by whatever client application is creating the records.

You can use the decode method of HTML::Entities to convert to plain text. You'll need to be careful of character encodings.

After Compline,
Zaxo

  • Comment on Re: ASCII characters not displayed correctly in csv file

Replies are listed 'Best First'.
Re^2: ASCII characters not displayed correctly in csv file
by shilpam (Sexton) on Jul 22, 2004 at 04:36 UTC
    The value stored in the database is First Encounter®. I am getting the values from the database and then printing it into a csv file. But, whenever it encounters the above mentioned value, the Perl script gives following error:
    combine() failed on argument: First Encounter®
    Can there be a solution wherein the data which is stored in the database is "First Encounter&# 174". But, when it has to print in the csv file, it converts this data into First Encounter®?
    I used HTML::Entities to convert "First Encounter&# 174" to First Encounter®. But, when I try to print the value in a csv file, it gives me the same (above mentioned) error.