When I use ODBC to connect to Sybase ASE dbs. I am not receiving UTF-8 character set.

883 views
Skip to first unread message

Marcel

unread,
Mar 27, 2014, 7:47:27 AM3/27/14
to f3-fra...@googlegroups.com
Database is UTF-8. Central is giving saying UTF-8.

$f3->set('DB', new \DB\SQL('odbc:Driver={Adaptive Server Enterprise};app=SYBASE;server=192.168.1.10;port=10000;db=cms;charset=utf8','sybase','sybase') );

Fat free is set to UTF $f3->set('ENCODING','UTF-8');

Files I am calling are UTF-8.

But receive G��l instead of Góól.

Even worst is that Render is stooped, when character like this is present and table where the word was is rendered as a text. Can you help me at least to not mess the rendering.

Sascha

unread,
Mar 27, 2014, 7:55:26 AM3/27/14
to f3-fra...@googlegroups.com
Where do you see those replacement chars? In the browser? Is your website even set to display UTF-8?

Add <meta charset="utf-8"> to your <head> or change the encoding manually in your browser settings.

Marcel

unread,
Mar 27, 2014, 7:58:43 AM3/27/14
to f3-fra...@googlegroups.com
Browser and PHP default_charset is UTF-8 I have the tag in head. The problem is that FatFree do not render view, if there is one of these characters. 
There is problem in back end not the browser cause server is sending bad characters.

Marcel

unread,
Mar 27, 2014, 8:02:45 AM3/27/14
to f3-fra...@googlegroups.com
If I do 

echo 'Príliš žluťoučký kůň úpěl dábělské ódy';

It work. But when I receive from DBS then not.

ikkez

unread,
Mar 27, 2014, 8:05:32 AM3/27/14
to f3-fra...@googlegroups.com
i would say the odbc drivers are guilty... i always had problems while playing with them.

Marcel

unread,
Mar 27, 2014, 8:13:43 AM3/27/14
to f3-fra...@googlegroups.com
How could I solve this ? Where to look?

ikkez

unread,
Mar 27, 2014, 8:19:59 AM3/27/14
to f3-fra...@googlegroups.com

Marcel

unread,
Mar 27, 2014, 9:56:35 AM3/27/14
to f3-fra...@googlegroups.com
The resolution is to use this in connection string.

charset=utf8;clientcharset=utf8;KeepOrgMultibyte=1

I thing that KeepOrgMultibyte=1 is the game changer.

$f3->set('DB', new \DB\SQL('odbc:Driver={Adaptive Server Enterprise};app=SYBASE;server=192.168.1.10;port=10000;db=cms;charset=utf8;clientcharset=utf8;KeepOrgMultibyte=1','sybase','sybase') );
Reply all
Reply to author
Forward
0 new messages