Re: Excel + multilanguages
| From: | Justin Patrin | Date: | Tue, 07 Dec 2004 00:34:57 +0000 |
| Subject: | Re: Excel + multilanguages | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16072@lists.php.net to get a copy of this message | ||
On Tue, 07 Dec 2004 00:19:06 +0100, Jiri Krivanek <jkrivanek1@nbox.cz> wrote:
> Hello,
>
> I am trying to generate the excel documents (xls) using the
> Spreadsheet_Excel_Writer class of PEAR.
>
> It works as expected for my local language.
>
> But the texts which I need to present via the XLS document are taken
> from the database in the UNICODE charset, coded using UTF8. Thus from
> the database, it can be received any mixture of characters (e.g.: latin
> mixed with cyrilic).
>
> My excel supports this without any problem. But in case I pass the UTF8
> string to the $worksheet->write() method, I receive unwanted result.
>
> Does anyone know how to achieve this?
>
> Thank you & best regards,
>
> Jiri.
>
This was *just* answered in the list. Today, in fact. Try this:
$xls->_codepage=1250;
// this codepage are windows codpages
// i.e. 1250 is for Central Europe
// 1251 is Cyrillic and so on
$xls->setVersion(8);
--
Justin Patrin