How to set to my code below charset CODE 737 php-laravel -
public function downloadtxt() { $txt = ""; $datas = user::select('home_id','home_firstname','home_lastname') ->orderby('home_id','desc') ->take(input::get('number')) ->get(); foreach($datas $data){ $txt .= 100000+$data['home_id'].' '.$data['home_firstname'].' '.$data['home_lastname'].php_eol; } //$txtname = 'mytxt.txt'; $headers = ['content-type: text/plain', 'test'=>'yoyo', 'content-disposition'=>sprintf('attachment; filename="%s"', input::get('name')), 'x-booyah'=>'workyworky', //'content-length'=>sizeof($datas) ]; return response::make($txt , 200, $headers ); }
how can iconv charset utf-8 code 737 dont know symbol 'utf-8'
code page 737 = > link
edit
$txt = mb_convert_encoding($txt,'cp737');
this doesnt work....does not recognize it!
1)so found solution hope helps someone.first of found function of php , other languages has "iconv" known!
2)second must find coding need net.name of coding need windows
3)finally here code need make encoding different before return must convert txt file
$txt = iconv("utf-8","cp737","$txt");
so means utf-8 cp737 , thirst parameter txt file created !
Comments
Post a Comment