ray Posted March 12, 2007 Report Share Posted March 12, 2007 daļa koda: $nosaukums = htmlentities($_REQUEST['nosaukums'], ENT_QUOTES); $nosaukums = wordwrap($nosaukums, 40, " ", 1); Ja formas laukā ievada burtu ar mikstinājumu vai garumzīmi, tad izlec paziņojums: Data too long for column 'nosaukums' at row 1 nesaprotu, kur ir kļūda, jo db lauka tips ir TEXT un collation ir utf8_general_ci. Link to comment Share on other sites More sharing options...
andrisp Posted March 12, 2007 Report Share Posted March 12, 2007 Collation neko nenozīmē šajā gadijumā. Kāds tev ir konekcijas charsets ? SET NAMES utf8 izpildīji ? Link to comment Share on other sites More sharing options...
ray Posted March 12, 2007 Author Report Share Posted March 12, 2007 (edited) set names ir izpildīts un ar konekcijas charset tu domāji <meta http-equiv="Content-Type" content="text/html; charset=utf-8">? ja $nosaukums = $_REQUEST['nosaukums'], tad viss izpildās bez problēmām. Edited March 12, 2007 by ray Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 13, 2007 Report Share Posted March 13, 2007 ray --> manualis manualis un velreiz manualis ;) --------- Like htmlspecialchars(), it takes an optional third argument charset which defines character set used in conversion. Support for this argument was added in PHP 4.1.0. Presently, the ISO-8859-1 character set is used as the default . --------- $nosaukums = htmlentities($_REQUEST['nosaukums'], ENT_QUOTES, UTF-8); un kaapeec neizmanto htmlspecialchars() ? gribi VISUS simbolus parverst par 'Html kodu' ? Link to comment Share on other sites More sharing options...
Recommended Posts