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

Problem with ä,ö,ü,ß..
#1

Hey!

First of all, I want to say "Thank You!" for this really great script!!
I've tested the Script on my Website for more than two weeks but no visitor left a comment..
Now, I know the Problem. You can't submit a comment which includes ö's, ä's, ü's....
Error Report: 'The comment entered was too short. Please enter a longer comment.'
In the german language we often use words which includes mutated vowels (correct translation?!).
So this is a real problem.
Do you have any idea how to fix this problem?

Please let me know.
Kind regards

Peter
Reply
#2

Hi,

This likely means that your page is not UTF-8 encoded.

Did you add the UTF-8 charset inside your head tag? Take a look at the integration guide and the example files to see how this should be done.

You can check the encoding in Firefox using Tools -> Page Info.

Have you completed the interview?
Reply
#3


Thanks for this quick answer.

Now I've added the UTF-8 charset inside the head tag.
But I can't insert mutated vowels in the "Name" and "Town" field.
I didn't find any option to change this at the admin panel.

In the script I've found this:

Quote:function cmtx_validate_name ($name) { //checks whether name was valid

if (cmtx_is_encoding_iso($name)) { //if encoding is ISO-8859-1
if (!preg_match('/^[a-z0-9&\-\'. ]+$/i', $name) || !preg_match("/^[a-z]+/i", $name)) { //if the submitted name does not validate
cmtx_error(CMTX_ERROR_MESSAGE_INVALID_NAME); //reject user for entering invalid name
}
}

Is this the right part of the comment to fix this problem? =P

Reply
#4

Hi,

I'm not sure that anything needs "fixing" because mutated vowels work fine on the demo. I think that it's just a matter of getting the charset of your page to be UTF-8 but without being able to see your website I can't determine whether you have achieved that correctly.

Nevertheless if you want to edit the processing code then the relevant function for the error message that you posted is cmtx_comment_minimum.

Have you completed the interview?
Reply
#5

Hey Steven,
first the link to my website: http://www.schelleklobber.de
The script is used as guestbook ("Gästebuch") and commentfunction ("Fotogalerie")

After adding this code (<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>) into the head-tag of every page, I converted the php-Files with Notepad++ into UTF-8 without BOM.


Reply
#6

It seems to be working now. I entered the following as a comment and it only produced errors about there being no name and email address.

Quote:fd fdd f ä ö ü ß ffwds

Have you completed the interview?
Reply
#7

I tested it one's again but I still have the problem that I can't insert a name or a town which includes mutated vowels...
I'm sure it's not a big deal to make mutated wovels possible for names and towns....
As long as it doesn't work, I'll add an advice in the error message.
Thanks a lot for your help!
This support is more than great and fast =)
Reply
#8

Hi,

I see what you mean now. I've been trying out a new solution:

In comments/includes/functions/processor.php, replace the cmtx_is_encoding_iso function with this:

PHP Code:
<?php 
function cmtx_is_encoding_iso ($entry) { //checks whether character encoding is ISO-8859-1

if (mb_check_encoding($entry, "ASCII")) {
return
true;
} else {
return
false;
}

}
//end of is-encoding-iso function

Have you completed the interview?
Reply
#9

Yeah this is really great!
Problem solved - no more questions! Big Grin
That was exactly what I was looking for.
Thanks a lot!
Greetings
Peter
Reply
#10

Hi Steven,

I want to allow the commenters to use ä, Ä, ö, Ö, ü, Ü and ß in their email and url (IDNs).

I think I have to change the function preg_match. But where (I have got 129 hits in Notepad Big Grin) and how?

Thanks in advance!

kr, kooler
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
23-Nov-2017, 08:09 PM
Last Post by Steven
20-Jul-2013, 01:22 PM
Last Post by Steven
19-Mar-2013, 02:37 PM
Last Post by Steven
02-Jul-2012, 08:19 PM
Last Post by geese10
16-Nov-2011, 12:02 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)