Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

guys! My Chrome doesn't properly recognize page encoding of our local TWIKI site. So, every time i enter the site i have to set suitable encoding manually (Settings -> Tools -> Encoding -> Cyrillic (Windows-1251)). I think that the problem could be solved by creating the special script which will change page encoding after site will have downloaded. The problem is i haven't found appropriate script & i don't have mind how to code it. Could you give me right advise in my question? Or i got a wrong way in solving this problem and there are some more suitable decisions of my problem...

share|improve this question

1 Answer 1

You got a wrong way in solving the problem. The solution is to make the server send an appropriate Content-Type header that announces the correct encoding. The methods for this depend on server-side software used. If the server does not announce any encoding, and it cannot easily be made to do that, you can use the <meta charset=windows-1251> tag in the head element of the document.

Chrome is quite capable of recognizing the encoding, when it has been announced properly, by the protocols.

share|improve this answer
    
Server sends such string '<meta http-equiv="Content-Type" content="text/html; charset=ru_RU.cp1251" />'. Maybe the problem in 'ru_RU.cp1251' isn't appropriate character name? –  theendrew Aug 14 '12 at 6:48
    
Right, it’s not a registered charset name and generally not recognized by browsers. In the official registry iana.org/assignments/character-sets the name is windows-1251, with no aliases (though cp1251 or cp-1251 might be in some use in practice). The name ru_RU.cp1251 looks like a locale name. Charset names do not encode country or language information, just the character encoding. –  Jukka K. Korpela Aug 14 '12 at 7:36
    
thanks a lot! We've resolved it with your help! –  theendrew Aug 14 '12 at 10:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.