windows-1251

Decoding a url-encoded windows-1251 (cp1251) string with JavaScript

你说的曾经没有我的故事 提交于 2019-12-13 00:09:27
问题 I have faced a problem, unfortunately, I have not found a correct solution: I need to decode url-slice that is encoded with windows-1251 (cp1251). I know there are theese methods - decodeURI() and decodeURIComponent() , but they work for UTF-8 only (as I have understood). A solution that I found uses deprecated methods escape() and unescape(). For example, there is sequence: %EF%F0%EE%E3%F0%E0%EC%EC%E8%F0%EE%E2%E0%ED%E8%E5 (программирование) The methods decodeURI() and decodeURIComponent()

How can I send cyrillic emails with Mandrill and Windows1251 encoding?

﹥>﹥吖頭↗ 提交于 2019-12-11 19:23:12
问题 I have started to use Mandrill to send all mails from our site but faced a problem with encoding. Encoding of the site is still Windows1251 / CP-1251 (I really don't have time to change it). I can send emails in English. But when I try to send cyrillic emails (Ukrainian, Russian, etc) it shows me an error "You must specify a key value...". I need always to encode body of email to UTF-8. In this case Mandrill sends letter well but emails are with broken encoding. Does somebody know if it

PHP Convert Windows-1251 to UTF 8

馋奶兔 提交于 2019-12-01 03:27:40
I have a small html code and I need to convert it to UTF-8. I use this iconv("windows-1251", "utf-8", $html); All text converts correctly, but if text for example in tag <i>...</i> , then it don't convert text and I see somethig like this Показать мн If you have access to the Multibye package, you can try it. See the PHP page here: http://www.php.net/manual/en/function.mb-convert-encoding.php $html_utf8 = mb_convert_encoding($html, "utf-8", "windows-1251"); You know, message like Показать мн you see if encoding for page is windows-1251 , but text encoded in utf-8 . I saw

PHP Convert Windows-1251 to UTF 8

人盡茶涼 提交于 2019-12-01 00:21:19
问题 I have a small html code and I need to convert it to UTF-8. I use this iconv("windows-1251", "utf-8", $html); All text converts correctly, but if text for example in tag <i>...</i> , then it don't convert text and I see somethig like this Показать РјРЅ 回答1: If you have access to the Multibye package, you can try it. See the PHP page here: http://www.php.net/manual/en/function.mb-convert-encoding.php $html_utf8 = mb_convert_encoding($html, "utf-8", "windows-1251"); 回答2: You know,