This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Encoding: utf-8 -> windows-1251 (for Cyrillic alphabets)
#1

Well I just have installed this fantastic script and did some customization (test page).
I would like to say it is outstanding script.

But my webpages have Windows-1251 character encoding. So when I'm trying to post a test comment in Russian, what I see is this error:

Sorry but 1 error was found when processing your comment.
Please correct this error and submit the form again:
The comment entered was too short. Please enter a longer comment.


Of course first of all I tried to change Min Characters and Min Words to 0, but it didn't help.

Now I know the problem is in encoding. So can you tell me where (in which files) I should change the utf-8 encoding to my desired windows-1251?
I know about the auto replace function, but I'm sure it is not neccessary to change ALL the 'charset=utf-8' in all the files inside the Commentics folder.

BTW, maybe I should try different solution?

Thanks in advance.

P.S. Just in case:
1) MySQL version: 5.1.41-log
2) Web server: Apache/1.3.37 (Unix) PHP/5.2.10 mod_ssl/2.8.28 OpenSSL/0.9.7e-p1
3) MySQL-client: 5.1.36
4) PHP v5.3
5) MySQL connection collation: utf8_general_ci
Reply
#2

Can you not just change your page's charset tag?

Code:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />

to:

Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

Have you completed the interview?
Reply
#3

Hello Steven,

If I will, all my Russian symbols become awkward and unreadable.
Reply
#4

It may be because your file, inception1_com.html, is not encoded as UTF-8.

In these cases, I just open the file with Notepad++ and select Format -> Convert to UTF-8 without BOM. I think that should work.

Have you completed the interview?
Reply
#5

Steven,
I've opened Notepad++, changed manually charset=utf-8 and then converted to UTF-8 without BOM.
You can see the result in the link in my 1st post - the letters are fine now, but comments still not work.

When trying to add a name (in Cyrillic), and comment (in Cyrillic), the error appears:

Sorry but 1 error was found when processing your comment.
Please correct this error and submit the form again:
The name must start with a letter and optionally contain - & . '


When trying to add a name (in English), and comment (in Cyrillic) - comment is added, but it is empty.
Reply
#6

If I visit your page in Firefox and go to Tools -> Page Info, it's saying that the encoding is 'windows-1251'.

Have you completed the interview?
Reply
#7

Solved!
2 steps should be made:

1. Encode all the html pages to utf-8.
2. In the hosting admin panel, change the site encoding to utf-8.
(I didn't change it, so browser encoded my pages in windows-1251)

Steven, script is amazing, I will definitely donate via PayPal.
Reply
#8

I'm pleased you solved it.

I like the styling changes you made, it really fits in with the rest of your website.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by malik01
06-Apr-2017, 02:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)