0

I am using Field Collections on a content type, in Drupal 7. I am exporting this data as a Views Data Export with these collections. I can get everything to print out, however, I get a weird special character and I cannot seem to get rid of it. Below is the output. I don't like the way it looks but getting rid of the special character is paramount.

Name of Conference: Conference TypeTitle of Abstract: Testing each field and its meritsAuthors: Tim Snip, Fish Head, Testing Page, Water CupCity: AtlantaState: GACountry: U.S.A.Date: June, 2018

I have been clicking every check box and testing everything I can but not luck. Is there a way to get rid of this? or find out why it is even showing up?

1
  • I sopouse is drupal 7, but please add tag 7 or 8. May 30 '17 at 15:55
2

You have UTF-8 characters in your data. The  character in your case is a UTF-8 non-breaking space, but it's being rendered with the wrong encoding.

You might be looking at the output in something that can't render UTF-8 correctly (some old, dumb text editor), or if you're using something that does understand UTF-8, perhaps the wrong encoding (i.e. iso-8859-1) was chosen when you opened the csv.

2
  • 1
    UTF character hanky panky almost always comes from people copying from MS word into rich text areas. Drupal usually handles this quite gracefully in terms of displaying things correctly, but exports to csv might be a different story. You may want to check and see if there any options around encoding as the data is getting exported into a file. May 31 '17 at 21:16
  • So to share what I did, I found this quick script and made a custom module to assist with the output of the fields with the UTF data inside it. The professor using the export uses terminal and grep to run through the data and needs it to be set straight on download. I couldn't find another solution. drupal.stackexchange.com/questions/112375/…
    – timwhelan
    Jun 1 '17 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.