Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character problem #4

Closed
durmusun opened this issue Jan 23, 2020 · 5 comments
Closed

Character problem #4

durmusun opened this issue Jan 23, 2020 · 5 comments

Comments

@durmusun
Copy link

Whenever there is a Turkish character in any cell it converts it to a question mark. Specifically, in the reading of "Ü,ü,Ö,ö” characters problem arises.

@shuchkin
Copy link
Owner

try set page charset before output
header('Content-Type: text/html; charset=utf-8');
$xls = SimpleXLSX::parse....

@memo20yorga
Copy link

I have the same issue. Some of the some türkish charachters "Ü,ü,Ö,ö" sometimes are read wrong. In the same cell when I change cell context it is read one time wrong one time right. interesting issue.

@shuchkin
Copy link
Owner

class works good with unicode, just don't forget set output charset:

header('Content-Type: text/html; charset=utf-8');

one time wrong one time right --- so browser charset autodetection not perfect without this header

@memo20yorga
Copy link

Thanks for your reply. I expressed myself wrong. sorry about my english. I'm trying to import excel file which includes turkhish characters. I read excel file and record them to the database with code shown below.
If you think it is appropriate I can send you my excel file which I made my trials

        header('Content-Type: text/html; charset=utf-8');
        $xls = new SimpleXLS($excelFilePath);
        $headers = $rows = [];
        //echo "<pre>";
        if ($xls->success()) {

            print_r($xls->rows());
            foreach ($xls->rows() as $k => $r) {
                if ($k === 0) {
                    $headers = $r;
                    continue;
                }else{
                    if($r[0]!=""){
                        $katilimci_bulk = new FuarKatilimci();
                        $katilimci_bulk->setFirmaAdi($r[0]);
                        $katilimci_bulk->setHolNo($r[1]);
                        $katilimci_bulk->setStantNo($r[2]);
                        $katilimci_bulk->setYetkili($r[3]);
                        $katilimci_bulk->setMail($r[4]);
                        $katilimci_bulk->setTelefon($r[5]);
                        $katilimci_bulk->setFax($r[6]);
                        $katilimci_bulk->setAdres($r[7]);
                        $katilimci_bulk->setSehir($r[8]);
                        $katilimci_bulk->setUrunGrubu($r[9]);
                        $katilimci_bulk->setFuar($entity->getFuar());


                        $em->persist($katilimci_bulk);
                        $em->flush();
                    }
                }
            }

@shuchkin
Copy link
Owner

shuchkin commented Apr 29, 2020

If you think it is appropriate I can send you my excel file which I made my trials

no, thx, have nice day )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants