Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export Mysql to ecxel/csv arabic encoding

    Hello, I want to export a mysql table to excel files and if not to csv, the problem with excel is it gives me data on one line, so I transformed it to csv and it works, the problem is it does not read arabic data

    header( 'Content-Type: text/csv; charset=utf-8; encoding=UTF-8' );
    header("Cache-Control: cache, must-revalidate");
    header("Pragma: public");
    header( 'Content-Disposition: attachment;filename=export.csv' );

    Help appreciated

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Not sure of your browser support. Try this: header('Content-Disposition: attachment; filename*="UTF-8\'\'export.csv"');


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •