Forums

Danish letters æøå

cmosses 11 Sep, 2008
Hello, I am running ChronoForms 3.0 beta 2 on Joomla 1.5.6.

When I paste HTML that contains the Danish letters æøå into the Form Code, and then click Apply, then only the HTML up until the first Danish letter is saved, the rest is discarded. There is no warning or error message.

The workaround is to use HTML entities, such as &oring for ø, and that will save OK.

However, then the problem is that the auto generated email template is only generated up until the first Danish letter HTML entity is encountered, the rest is ignored, and I end up with only a partial email template. Again no error or warning messages.

Is this a bug?

Thanks
Max_admin 11 Sep, 2008
Hi cmosses,

please check that your DB table charset is utf8 ? and every field inside it too ? I test here with Russian characters and it looks working fine..

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cmosses 11 Sep, 2008
The database collation and the collation of all the fields is utf8_general_ci. Is that OK?
epd 11 Sep, 2008
Hi,
I have exactly same problem as cmosses. I have Joomla 1.5.6, CHRONO 3.0 J1.5 BETA 2, and I can't get working Finnish letters äää ööö (ååå) at "FORM CODE" --> "On submit code - after sending email".
All text after finnish special letters is discarded. BUT, If I go to the phpmyadmin, and edit the form at jos_chrono_contact --> and field "onsubmitcode", everything works fine after saving. No discarding text, and äää ööö appears fine to the frontendpage. And yes, my *nix / mysql DB / table charset is set to UTF8_general_ci.
Max_admin 11 Sep, 2008
I cant generate this here at all so it should be some issue with your websites or something else I'm not sure but lets try this hack :

at admin.chronocontact.php find the saveChronoContact function and then find this line :

$post = JRequest::get( 'post' , JREQUEST_ALLOWRAW );


add after it :

$post['html'] = htmlentities($post['html'] );


let me know how that works!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
epd 11 Sep, 2008
Ok, I tried but it didn't work. I am not sure if I did it right, because I found "$post = JRequest::get( 'post' , JREQUEST_ALLOWRAW );" line from three places.
ROWS: 270, 343 and 1185
I hope you find solution for us🙂
ps. I don't believe my websites is the problem. Everything is pretty newly installed with default settings.
Max_admin 12 Sep, 2008
Hi epd, did you add the hack to the function I mentioned ? first find that function name and inside it you will find the desired line.

let me know

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
epd 13 Sep, 2008
I can confirm now that the hack didn't work. 😑
edit: and I just noticed it did mess up with all the "FORM CODE" --> "FORM HTML". It changed the code to this: "&amp;amp;amp;amp;lt;p&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;label for=&amp;amp;amp;amp;quot;name_f&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;Etunimi&amp;amp;amp;amp;lt;/label&amp;amp;amp;amp;gt; &amp;amp;amp;amp;lt;input type=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot; name=&amp;amp;amp;amp;quot;name_f&" and "<div class="form_item"><div class="form_element cf_heading"><h4 id="" class="cf_text">"
(It's good I took backups before messing with admin.chronocontact.php)
Max_admin 13 Sep, 2008
Hi epd,

I'm sure its some server setting, because it works fine here and will work with you if you tried some where else, but whats it exactly this is what I'm not sure about yet.

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
epd 13 Sep, 2008
Hi admin,
We just installed joomla to another server with different apache+php- configuration and chronoforms worked fine, just as it ought to be.
Our configuration is:
Apache/1.3.34 (Debian) PHP/4.4.4-8+etch6

The configuration we tested with:
Apache/2.2 (Debian) PHP Version 5.2.0-8+etch11

The charsets are set as same (utf8_unicode_ci) at both servers.

So it seems that the problem it with Apache 1.3.34 or Php 4.4.4-8. At the moment it is not possible to change to Apache 2.2 w/ Php5.x because of Joomla incompatibilites.
Any ideas?

And to cmosses, have you solved the problem?
Max_admin 14 Sep, 2008
Hi epd,

it works well here with Apache 2.2.8 and PHP 5.2.5, I believe its some server or PHP setting.

I want you to test something else, do you know the function you edited ? the save one, at the end of this function you should see a $mainframe->redirect line, comment it by add // infront of it.

now below the line :
$post = JRequest::get( 'post' , JREQUEST_ALLOWRAW );
add
echo $post['html'];


now save the file, open the form, add your danish code and click SAVE, you should see your danish code, do you see it all or also cut at the first danish letter ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
epd 14 Sep, 2008
Hi. I took some pictures step by step.

1)


2)


3)

In picture 4. and 5. you can see all text after first ä/ö/å letter is cut away.
4)


5)


So immediately after pressing SAVE and echoing $post[''], nothing seems to be cut away. I hope this helps you a little bit more.

-EPD-
Max_admin 14 Sep, 2008
Very good, lets try another small thing please.

with the same hack already working in place, lets add this line 2 times :

echo $row->onsubmitcode;


once after those lines :

if (!$row->bind( $post )) {
		echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n";
		exit();
	}


next one after those lines :

if (!$row->store()) {
		echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n";
		exit();
	}


I expect that at the 2 places we should get the same output as the first hack in your screenshot above, please let me know.

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
epd 14 Sep, 2008
I can confirm that adding that line to those two places, does exactly the same as earlier hack. Just how you expected!🙂
I'll wait next step of briefing to do. And thanks so far for helping me.
Max_admin 15 Sep, 2008
Hi epd,

the result we reached means that before Chronoforms adds the data to the database, all the characters are there, so the issue is with the database itself or the joomla core code which inserts the data, can't know how to fix this though.

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
guimplenchik 17 Oct, 2008
I had similar problem with Russian letters, I solved it by adding adding the line in htaccess file directive without any hacks mentioned above :

AddDefaultCharset UTF-8

Hope this will help...
Max_admin 18 Oct, 2008
Thanks for the tip, hopefully this will solve it for those we have the same problem!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
damiandab 23 Feb, 2009
Hello ,

I have also problem with french letters.

I'm new in Jommla and I don't understand this solution:

I had similar problem with Russian letters, I solved it by adding adding the line in htaccess file directive without any hacks mentioned above :

AddDefaultCharset UTF-8



should I only add this line "AddDefaultCharset UTF-8" to my joomla's htaccess.txt file?

Best,
Damian
GreyHead 23 Feb, 2009
Hi Damien,

Yes, try that please.

Bob
damiandab 23 Feb, 2009
Hi Bob,
thanks for your answer 🙂
the solution with "httaccess" didn't help. The problem was with my webhoster.
As default my webspace runs under charset ISO-8859-1.
I changed my server's presets and now everything works very well :mrgreen:

Best,
Damian
Max_admin 24 Feb, 2009
Thank you for posting the fix!

Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marco.depa 09 Mar, 2009
Hi all,

I had similar problem with Spanish characters.
The solution AddDefaultCharset UTF-8 in .htaccess worked for me.

Note: I had to put the file .htaccess in my /administrator directory.

Hope this help.

Bye.
This topic is locked and no more replies can be posted.