I found out following workaround.
I declared save() and read() methods in model class like this
(probably i need find(), query(), etc, too):

    function save($data){
        foreach($data as $n => $v){
            foreach($v as $x => $y){
                if(is_string($y)) $data[$n][$x] = iconv("UTF-8",
"Windows-1250//IGNORE", $y);
            }
        }
        return parent::save($data);
    }
    function read(){
        $data = parent::read();
        foreach($data as $n => $v){
            foreach($v as $x => $y){
                if(is_string($y)) $data[$n][$x] =
iconv("Windows-1250", "UTF-8", $y);
            }
        }
        return $data;
    }

I use Windows-1250 codepage because with ucs-2 there is sql error when
inserting records (i think mssql driver doesn't handle utf well).
That way seems to work, but maybe there is a better (more general)
solution ?  All suggestions welcome.

On 25 Cze, 23:19, kjc <[email protected]> wrote:
> Hi,
>
> I use sql server 2005 for storing data.
> Is it possible to setup conversion as described in
>
> http://support.microsoft.com/kb/232580
>
> p. 2
>
> in cake ?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to