надо его перевести в кодировку cp1251
но там есть и cp1251 и utf-8
$text=iconv("utf-8", "windows-1251", $text); - не помогает, вобще ничего не выводится, подскажите пожалуста как быть
Спустя 21 минута, 24 секунды (19.05.2009 - 17:05) twin написал(а):
Цитата |
но там есть и cp1251 и utf-8 |
Там, это где? Разные файлы что ли?
Спустя 18 минут, 5 секунд (19.05.2009 - 17:23) z3rg написал(а):
twin, спасибо, уже не надо разобрался, файл 1
сделал функцией
сделал функцией
PHP |
function utf8_win($s) |
а можно какнибудь на джава скрипт перекодировать
Спустя 7 дней, 20 часов, 1 минута, 58 секунд (27.05.2009 - 13:25) ApuktaChehov написал(а):
JavaScript не умеет кодировать данные. Java - пожалуйста.

Спустя 1 час, 53 минуты, 40 секунд (27.05.2009 - 15:19) FatCat написал(а):
Не умеет - научим. 
Собственно, написал Вам прямо сейчас такую функцию. Даете ей юникод, получаете винкириллицу:

Собственно, написал Вам прямо сейчас такую функцию. Даете ей юникод, получаете винкириллицу:
Свернутый текст
HTML |
<script type="text/javascript"> function convert_u2w(txt) { var u = new Array( String.fromCharCode(208)+String.fromCharCode(144), String.fromCharCode(208)+String.fromCharCode(145), String.fromCharCode(208)+String.fromCharCode(146), String.fromCharCode(208)+String.fromCharCode(147), String.fromCharCode(208)+String.fromCharCode(148), String.fromCharCode(208)+String.fromCharCode(149), String.fromCharCode(208)+String.fromCharCode(150), String.fromCharCode(208)+String.fromCharCode(151), String.fromCharCode(208)+String.fromCharCode(152), String.fromCharCode(208)+String.fromCharCode(153), String.fromCharCode(208)+String.fromCharCode(154), String.fromCharCode(208)+String.fromCharCode(155), String.fromCharCode(208)+String.fromCharCode(156), String.fromCharCode(208)+String.fromCharCode(157), String.fromCharCode(208)+String.fromCharCode(158), String.fromCharCode(208)+String.fromCharCode(159), String.fromCharCode(208)+String.fromCharCode(160), String.fromCharCode(208)+String.fromCharCode(161), String.fromCharCode(208)+String.fromCharCode(162), String.fromCharCode(208)+String.fromCharCode(163), String.fromCharCode(208)+String.fromCharCode(164), String.fromCharCode(208)+String.fromCharCode(165), String.fromCharCode(208)+String.fromCharCode(166), String.fromCharCode(208)+String.fromCharCode(167), String.fromCharCode(208)+String.fromCharCode(168), String.fromCharCode(208)+String.fromCharCode(169), String.fromCharCode(208)+String.fromCharCode(170), String.fromCharCode(208)+String.fromCharCode(171), String.fromCharCode(208)+String.fromCharCode(172), String.fromCharCode(208)+String.fromCharCode(173), String.fromCharCode(208)+String.fromCharCode(174), String.fromCharCode(208)+String.fromCharCode(175), String.fromCharCode(208)+String.fromCharCode(176), String.fromCharCode(208)+String.fromCharCode(177), String.fromCharCode(208)+String.fromCharCode(178), String.fromCharCode(208)+String.fromCharCode(179), String.fromCharCode(208)+String.fromCharCode(180), String.fromCharCode(208)+String.fromCharCode(181), String.fromCharCode(208)+String.fromCharCode(182), String.fromCharCode(208)+String.fromCharCode(183), String.fromCharCode(208)+String.fromCharCode(184), String.fromCharCode(208)+String.fromCharCode(185), String.fromCharCode(208)+String.fromCharCode(186), String.fromCharCode(208)+String.fromCharCode(187), String.fromCharCode(208)+String.fromCharCode(188), String.fromCharCode(208)+String.fromCharCode(189), String.fromCharCode(208)+String.fromCharCode(190), String.fromCharCode(208)+String.fromCharCode(191), String.fromCharCode(209)+String.fromCharCode(128), String.fromCharCode(209)+String.fromCharCode(129), String.fromCharCode(209)+String.fromCharCode(130), String.fromCharCode(209)+String.fromCharCode(131), String.fromCharCode(209)+String.fromCharCode(132), String.fromCharCode(209)+String.fromCharCode(133), String.fromCharCode(209)+String.fromCharCode(134), String.fromCharCode(209)+String.fromCharCode(135), String.fromCharCode(209)+String.fromCharCode(136), String.fromCharCode(209)+String.fromCharCode(137), String.fromCharCode(209)+String.fromCharCode(138), String.fromCharCode(209)+String.fromCharCode(139), String.fromCharCode(209)+String.fromCharCode(140), String.fromCharCode(209)+String.fromCharCode(141), String.fromCharCode(209)+String.fromCharCode(142), String.fromCharCode(209)+String.fromCharCode(143), String.fromCharCode(209)+String.fromCharCode(145), String.fromCharCode(208)+String.fromCharCode(129) ); var w = new Array( 'А','Б','В','Г','Д','Е','Ж','З','И','Й','К','Л', 'М','Н','О','П','Р','С','Т','У','Ф','Х','Ц','Ч', 'Ш','Щ','Ъ','Ы','Ь','Э','Ю','Я','а','б','в','г', 'д','е','ж','з','и','й','к','л','м','н','о','п', 'р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы', 'ь','э','ю','я','ё','Ё' ); for(i in u) { txt = txt.split(u[i]).join(w[i]); } return txt; } </script> |
Спустя 31 минута, 42 секунды (27.05.2009 - 15:50) FatCat написал(а):
Кстати, если в конце
HTML |
txt = txt.split(u[i]).join(w[i]); |
заменить на
HTML |
txt = txt.split(w[i]).join(u[i]); |
она из винкириллицы в юникод перекодировать будет.

Спустя 20 дней, 21 час, 35 минут, 29 секунд (18.06.2009 - 13:26) shcoder написал(а):
Блин! как люди сами выдумывают скбе проблеммы...
Как может быть в одном файле cp1251 и utf-8?
Как может быть в одном файле cp1251 и utf-8?