es131245 Posted August 6, 2009 Share Posted August 6, 2009 2 questions....die(" #Some wierd russian text # ");and when i open txt in browser likehttp://localhost/qwerty.txtif i use eng everything is good but for other languages how can i set encoding???Something like <meta http-equiv="content-type" content="text/html" charset="utf-8" /> Link to comment Share on other sites More sharing options...
boen_robot Posted August 6, 2009 Share Posted August 6, 2009 You can use the header() function, like: header('Content-Type:text/plain;charset=utf-8'); Link to comment Share on other sites More sharing options...
es131245 Posted August 6, 2009 Author Share Posted August 6, 2009 how can i attach heading to txt file or die() ????? Link to comment Share on other sites More sharing options...
boen_robot Posted August 6, 2009 Share Posted August 6, 2009 how can i attach heading to txt file or die() ?????If in PHP, you place that function right before you die(), i.e.header('Content-Type:text/plain;charset=utf-8');die(" #Some wierd russian text # "); If in a txt file... you'll have to append the header with an .htaccess file, assuming you have mod_headers enabled and .htaccess rights to begin with. Link to comment Share on other sites More sharing options...
es131245 Posted October 18, 2009 Author Share Posted October 18, 2009 but iffopen ('123.txt') or die('utf-8 sign'); Link to comment Share on other sites More sharing options...
boen_robot Posted October 18, 2009 Share Posted October 18, 2009 but iffopen ('123.txt') or die('utf-8 sign');Doesn't matter. If it's going out to the browser,header('Content-Type:text/plain;charset=utf-8'); needs to be present beforehand. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.