Category : utf-8

inside my laravel-API I have to call the main.py file and pass the persian string UTF-8 to main.py this is the laravel-API $command = ‘سلام چطوری؟’ $output = ”; exec("python ../../../python/main.py ‘$command’", $output); dd($output); this is the main.py import sys def main(text): return text x = sys.argv[1] print(x) problem is when I pass something like ..

Read more

I built a multilanguage website with laravel. The secondary language is Russian. I’m using laravel-translatable package to store multilanguage content. It’s stored like this. {"en":"text", "ru":"text"}. Now I realized that Russian characters are not being inserted as they are, instead, they are encoded, but they display correctly on the website. This is very bad because ..

Read more

I have a function like this and with cronjob it sends reporters csv file.But the issue is : public function exportNsaveServer($heading, $rows, $filename) { $path = ‘admin/exports/’ . Auth::user()->id; $this->makeDir($path); $storageBasePath = Storage::disk(‘public’)->getDriver()->getAdapter()->getPathPrefix(); $filename = rand() . ‘_’ . $filename; $path = $storageBasePath . ‘adminexports’ . Auth::user()->id . ” . $filename; $fullpath = ‘admin/exports/’ . ..

Read more

I have a function like this and with cronjob it sends reporters csv file.But the issue is : public function exportNsaveServer($heading, $rows, $filename) { $path = ‘admin/exports/’ . Auth::user()->id; $this->makeDir($path); $storageBasePath = Storage::disk(‘public’)->getDriver()->getAdapter()->getPathPrefix(); $filename = rand() . ‘_’ . $filename; $path = $storageBasePath . ‘adminexports’ . Auth::user()->id . ” . $filename; $fullpath = ‘admin/exports/’ . ..

Read more

Hi I got error on Laravel telegram bot while using non english Bad Request: strings must be encoded in UTF-8 here my code . also try to set header but no luck Route::get(‘/test’,function(){ $bot_token = ‘bot1773931989:xxxxx-uUGuaxfI’; $chat_id = ‘-1001152xxxx’; $message = "binance กำลัง"; $res = Http::post("https://api.telegram.org/$bot_token/sendMessage?chat_id=$chat_id&text=$message"); return $res; }); thank for advance Sourc..

Read more

This question already has an answer here: UTF-8 all the way through 15 answers In database I have some records1 (with letters like: ě,š,č,ř,ž,ý,á,í,é) that goes from one table to another (id to another table) 2 by using FK in laravel and then I’m showing this FK on page 3, but there it’s displayed just ..

Read more