1

I have the text with special characters like "Gürhan Bakırküre" but when i export this as CSV and opened with excel it was showing as "Gürhan Bakırküre".

I am exporting the text using drupal data export view.

3 Answers 3

1

May be below link can help you - http://www.jpstacey.info/blog/2015-05-04/unicode-accented-characters-drupal-views-data-export-and-excel.

In a nutsehll, jus follow below instructions-

Copy views-data-export-csv-header.tpl.php to site's custom theme, and add a single executable line (print "\xEF\xBB\xBF";) to write the BOM:

<?php

// Print out header row, if option was selected.
if ($options['header']) {
  // Begin file with UTF-8 BOM.
  print "\xEF\xBB\xBF";
  // Now continue to output header as normal.
  print implode($separator, $header) . "\r\n";
}

Thanks

Sign up to request clarification or add additional context in comments.

4 Comments

Please avoid link-only answers as links might tend to change or break in the future. Instead explain the answer here itself.
Thanks user5317514 ..the information in above link helped.
@prudhvi, I agree with you, i will post the answer seprately, plz vote up
@user5317514 Please edit your answer, by copying your comment.
0

You need to choose the proper encoding in the Excel import dialog. For example, I saved the following sample data into a CSV file:

Gürhan Bakırküre, 1
Tim Biegeleisen, 2

I saved the file as UTF-8, since I do not know the exact encoding of your actual data. During the import process in Excel, I made sure to also select the same UTF-8 encoding as shown in this screen capture:

enter image description here

The text rendered in Excel correctly with no problems. You should probably find out what exact encoding your original file is and use that when you import.

2 Comments

Thanks Tim, i am exporting the data using drupal view.May be it causing.
Please try my answer and then mark it correct if it solved your problem.
0

Drupal 8 and Drupal 9, Unicode signature can be included in format settings Format settings > CSV Settings

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.