php - String is not saved correctly in database -


i trying save string in database ,

&#1055&#1077&#1088&#1080&#1086&#1076&#32&#1076&#10

the string want save : Период действия s...

the table encoding is: cp1251_general_ci

i don't know in encoding string - getting excel document.

i tried this, didn' help.

$nomer = iconv('utf-8','windows-1251', $str ); 

is there solution this?

you haven't mentioned database engine you're using, try changing table encoding utf8_general_ci or utf8_unicode_ci.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -