Excel file not show correct unicode font. Please support Unicode.

Comments

creaoy’s picture

Can you please send me an example. It works for me.

Daniel A. Beilinson’s picture

I think it's MS Excel not support UTF. And this's huge problem. Could you please support something other character encoding? Or tell me please where I can put encoding function, for example this (for win1251):

function utf2win1251($content)
{
                $newcontent = "";
 
                for ($i = 0; $i < strlen($content); $i++)
                {
                        $c1 = substr($content, $i, 1);
                        $byte1 = ord($c1);
                        if ($byte1>>5 == 6)
                        {
                                $i++;
                                $c2 = substr($content, $i, 1);
                                $byte2 = ord($c2);
                                $byte1 &= 31;
                                $byte2 &= 63;
                                $byte2 |= (($byte1 & 3) << 6);
                                $byte1 >>= 2;
                                $word = ($byte1<<8) + $byte2;
 
                                if ($word == 1025) $newcontent .= chr(168);
                                else if ($word == 1105) $newcontent .= chr(184);
                                else if ($word >= 0x0410 && $word <= 0x044F) $newcontent .= chr($word-848);
                                else
                                {
                                        $a = dechex($byte1);
                                        $a = str_pad($a, 2, "0", STR_PAD_LEFT);
                                        $b = dechex($byte2);
                                        $b = str_pad($b, 2, "0", STR_PAD_LEFT);
                                        $newcontent .= "?".$a.$b.";";
                                }
                        }
                        else
                                $newcontent .= $c1;
                }
 
        return $newcontent;
}
Alpha5’s picture

Only Excel not show correct UTF-8. DOC is OK.
But your module not support Header and Footer? Can you add this feature, please?

And more thing, when view field, fields can not merge into one column like view style is table.

amogiz’s picture

I am trying to export fields that got french caracters (with accent) and this does not work. Could you help me to do this ? Thanx

creaoy’s picture

Status: Active » Fixed

Now with utf8 support.

creaoy’s picture

Status: Fixed » Closed (fixed)