Support special characteres , It is related to #10
This commit is contained in:
parent
ffe8e6d34e
commit
c9cc0857c6
2 changed files with 7 additions and 7 deletions
|
|
@ -3,16 +3,16 @@ import {CSVLink, CSVDownload} from 'react-csv';
|
|||
import Table from './Table.jsx';
|
||||
|
||||
const csvHeaders = [
|
||||
"Company","Contact","Country"
|
||||
"Company","جهة الإتصال ","王玉普"
|
||||
]
|
||||
const csvData =[
|
||||
['Alfreds Futterkiste' ,'Maria Anders', 'Germany'] ,
|
||||
['Rathath IT', 'Abdennour TM' , 'Tunisia'] ,
|
||||
['Laughing Bacchus Winecellars', 'Yoshi Tannamuri' , 'Canada'],
|
||||
['Rathath IT', 'Abdennour TM' , 'تونس'] ,
|
||||
['Sinopec', '王玉普' , '中国'],
|
||||
['Auto1', 'Petter' , 'Germany'] ,
|
||||
['Estifeda', 'Yousri K' , 'Tunisia'] ,
|
||||
['Nine 10ᵗʰ', 'Amjed Idris' , 'Saudi Arabia'] ,
|
||||
['Tamkeen', 'Mohamed Alshibi' , 'Saudi Arabia'] ,
|
||||
['Estifeda', 'Yousri K' , 'تونس'] ,
|
||||
['Nine 10ᵗʰ', 'Amjed Idris' , 'المملكة العربية السعودية '] ,
|
||||
['Tamkeen', 'Mohamed Alshibi' , 'المملكة العربية السعودية'] ,
|
||||
['Packet Publishing', 'David Become' , 'UK'] ,
|
||||
['Software hourse', 'Soro' , 'Poland']
|
||||
];
|
||||
|
|
|
|||
|
|
@ -41,6 +41,6 @@ export const toCSV = (data, headers, separator) => {
|
|||
};
|
||||
|
||||
export const buildURI = ((data, headers, separator) => encodeURI(
|
||||
`data:text/csv;charset=utf-8,${toCSV(data, headers, separator)}`
|
||||
`data:text/csv;charset=utf-8,\uFEFF,${toCSV(data, headers, separator)}`
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue