Looktrne Posted July 9, 2008 Share Posted July 9, 2008 I have some russian text in a mysql database I can see it fine in phpmyadmin but when my php script calls the database for it it shows as ????? for example Добро would show up as ?????? do I have to set the collation before calling to the database? sorry but I have never used anything except english in the past thanks for any help on this Paul Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/ Share on other sites More sharing options...
maxudaskin Posted July 9, 2008 Share Posted July 9, 2008 When inserting, try using HTMLSPECCHARS. http://ca3.php.net/manual/en/function.htmlspecialchars.php Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/#findComment-585899 Share on other sites More sharing options...
Looktrne Posted July 10, 2008 Author Share Posted July 10, 2008 how can I pull the variable from the database and display it in the original russian format? Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/#findComment-585980 Share on other sites More sharing options...
maxudaskin Posted July 10, 2008 Share Posted July 10, 2008 htmlspecialchars_decode() http://ca.php.net/manual/en/function.htmlspecialchars.php http://ca.php.net/manual/en/function.htmlspecialchars-decode.php Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/#findComment-585988 Share on other sites More sharing options...
Looktrne Posted July 12, 2008 Author Share Posted July 12, 2008 I tried this in my querry and get nothing but ???? if I log into php my admin I see the russian but I cant seem to pull it into php in anyway to display the russian from the database can someone please provide an example of pulling the content from the database and displaying the russian? I really need an example nothing I tried has worked.... thanks for any help on this guys Paul Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/#findComment-588141 Share on other sites More sharing options...
unsider Posted July 12, 2008 Share Posted July 12, 2008 Can you post some code? We might be able to help you more. Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/#findComment-588144 Share on other sites More sharing options...
xtopolis Posted July 12, 2008 Share Posted July 12, 2008 Save your page in a different encoding. When you do file->save as: At the bottom choose: Encoding-> UTF-8 [instead of the default ANSI] However, I do not know if there are any downsides to this. This is simply what I did when I wished to display Russian chars on a site I helped build. If there are any downsides, I would like to hear them so I can change as well. Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/#findComment-588145 Share on other sites More sharing options...
vikramjeet.singla Posted July 12, 2008 Share Posted July 12, 2008 Hi change the charset in html when you are displaying page on client site. refer below: <meta http-equiv="content-type" content="text/html; charset=KOI8-R"> Link to comment https://forums.phpfreaks.com/topic/113998-russian-showing-up-as-in-php-from-mysql/#findComment-588156 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.