• 7 odgovora
  • 3.190 pregleda
AMF PHP Encoding 27.02.2011. u 07:35 · pre 190 meseci #1
Postovani,

Za povezivanje baze podataka i flash-a koristim AMFPHP. U baza je podesena na utf8_unicode_ci encoding, kada preko HTML-a pozovem iz baze neke podatke, dobijem redovan rezultat. Naprimer: "Čačanska banka A.D. Čačak".
Problem nastaje kada istu funkciju pozovem preko AMFPHP-a, ispisuje mi ?a?anska banka A.D. ?a?ak. Kontaktirao sam serversku podršku, rekli su mi da je sa njihove strane sve uredu. Pokušao sam i sve kombinacije za
Code:
    $gateway->setCharsetHandler("utf8_decode","UTF-8","UTF-8");
            $gateway->setCharsetHandler( "none", "ISO-8859-1", "ISO-8859-1" );
            $gateway->setCharsetHandler( "iconv", "ISO-8859-1", "ISO-8859-1" );
            $gateway->setCharsetHandler( "utf8_decode", "ISO-8859-1", "ISO-8859-1" );
            $gateway->setCharsetHandler( "none", "ISO-8859-1", "ISO-8859-1" );
            $gateway->setCharsetHandler( "iconv", "your codepage", "your codepage" );
            $gateway->setCharsetHandler( "none", "ISO-8859-1", "ISO-8859-1" );
            $gateway->setCharsetHandler( "iconv", "big5", "big5" );
            $gateway->setCharsetHandler( "iconv", "CP950", "CP950" );
            $gateway->setCharsetHandler( "iconv", "Shift_JIS", "Shift_JIS" );
            $gateway->setCharsetHandler( "iconv", "CP932", "CP932" );
            $gateway->setCharsetHandler( "iconv", "CP949", "CP949" );
            $gateway->setCharsetHandler( "none", "ISO-8859-1", "ISO-8859-1" );


Nijednom nisam dobio dobar rezultat.

Hvala unapred,

Daniel Dulić
Potpis

--

With The Best Regards,

Daniel Dulić, Web System Development
http://www.citysuteam.com
Telefon: +381 (0) 64 / 364 - 65 - 91
E-Mail: [email protected]
CitySu team, Web Services Company
Antona Aškerca 44/50,
24000 Subotica
CitySu team
Re: AMF PHP Encoding 27.02.2011. u 09:53 · pre 190 meseci #2
A jesi probao ovako nešto:
Code:
$gateway->setCharsetHandler("mbstring","UTF-8","UTF-8");

Naravno, da bi to prošlo, mbstring ekstenzija mora da bude instalirana.
Re: AMF PHP Encoding 27.02.2011. u 11:26 · pre 190 meseci #3
Hvala Vam Nikola, nadam se da ce raditi kada instaliram ekstenziju.

Prijateljski pozdrav,
Daniel Dulic
Potpis

--

With The Best Regards,

Daniel Dulić, Web System Development
http://www.citysuteam.com
Telefon: +381 (0) 64 / 364 - 65 - 91
E-Mail: [email protected]
CitySu team, Web Services Company
Antona Aškerca 44/50,
24000 Subotica
CitySu team
Re: AMF PHP Encoding 28.02.2011. u 23:11 · pre 190 meseci #4
Ipak ne radi, pokusao sam. Postavio sam kod, kontaktirao sam podrsku, rekli su da je ta ekstenzija vec instalirana na servere. Da li postoji neko drugo resenje?
Unapred hvala.
Potpis

--

With The Best Regards,

Daniel Dulić, Web System Development
http://www.citysuteam.com
Telefon: +381 (0) 64 / 364 - 65 - 91
E-Mail: [email protected]
CitySu team, Web Services Company
Antona Aškerca 44/50,
24000 Subotica
CitySu team
Re: AMF PHP Encoding 01.03.2011. u 08:08 · pre 190 meseci #5
Ajde preko PHPmyadmin-a (ili sta vec koristis) pokreni komandu: SHOW CREATE TABLE ime_tabele;
(Ime tabele je ISTA tabela iz koje si gore citao podatke)

... da vidimo da li je tabela u utf-8 enkodingu.
Ako si probavao sa obicnim mysql_query() i nisi na pocetku pokrenuo mysql_query("SET NAMES UTF8"); onda vjerovatno nije UTF8, a ovaj AMFPHP vjerovatno to automatski nastima.
Re: AMF PHP Encoding 03.03.2011. u 22:35 · pre 190 meseci #6
E izgleda da je ovde problem. Kada odem postavim taj upit, kao rezultat dobijem ovo:
Code:
CREATE TABLE `ebanking` (
 `ebankingID` int(120) NOT NULL auto_increment,
 `bankID` int(125) NOT NULL,
 `visible` int(1) NOT NULL,
 `userAdded` int(20) NOT NULL,
 `ebankingName` varchar(50) character set utf8 collate utf8_unicode_ci NOT NULL,
 `openingExpenses` varchar(15) character set utf8 collate utf8_unicode_ci NOT NULL,
 `monthlyExpenses` varchar(15) character set utf8 collate utf8_unicode_ci NOT NULL,
 `cancelingExpenses` varchar(15) character set utf8 collate utf8_unicode_ci NOT NULL,
 `channel` int(2) NOT NULL,
 `details` text character set utf8 collate utf8_unicode_ci NOT NULL,
 PRIMARY KEY  (`ebankingID`)
) ENGINE=MyISAM AUTO_INCREMENT=76 DEFAULT CHARSET=latin1


Kada promenim tip encodinga polja, rezultat dobijem:
Code:
CREATE TABLE `banks` (
 `bankID` int(15) NOT NULL auto_increment,
 `visible` int(1) NOT NULL,
 `bankName` varchar(180) collate utf8_unicode_ci NOT NULL,
 `bankCity` varchar(60) collate utf8_unicode_ci NOT NULL,
 `bankLogo` varchar(250) collate utf8_unicode_ci NOT NULL,
 `bankDesc` text collate utf8_unicode_ci NOT NULL,
 `userAdded` varchar(100) collate utf8_unicode_ci NOT NULL,
 `date` int(10) NOT NULL,
 PRIMARY KEY  (`bankID`)
) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
i opet bude isto...
Potpis

--

With The Best Regards,

Daniel Dulić, Web System Development
http://www.citysuteam.com
Telefon: +381 (0) 64 / 364 - 65 - 91
E-Mail: [email protected]
CitySu team, Web Services Company
Antona Aškerca 44/50,
24000 Subotica
CitySu team
Re: AMF PHP Encoding 03.03.2011. u 22:51 · pre 190 meseci #7
Postovani Borise Trivić,
Sada sam shvatio :) Dodao sam
Code:
mysql_query("SET NAMES UTF8");
i sada radi :) Hvala Vam puno.
Prijateljski pozdrav,
Potpis

--

With The Best Regards,

Daniel Dulić, Web System Development
http://www.citysuteam.com
Telefon: +381 (0) 64 / 364 - 65 - 91
E-Mail: [email protected]
CitySu team, Web Services Company
Antona Aškerca 44/50,
24000 Subotica
CitySu team
Re: AMF PHP Encoding 03.03.2011. u 23:46 · pre 190 meseci #8
Brate, nemoras mi persirati nisam ja bas toliko star :))
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme