Current time: 04-17-2024, 06:24 AM Hello There, Guest! (LoginRegister)


Post Reply 
A suggestion concerning special chars (eg. umlaut)
Author Message
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #1
A suggestion concerning special chars (eg. umlaut)
Hi
there is an open tickets dealing with characters outside of ascii - #915.

It turns out hat most of the texts which are put in the forms are converted to html code which checking the input itself.
Raphael did some improvements to be able to skip the coversion to html - but it really looks like almost all text fields may containe umlauts/special characters.
As long as the texts are only used for HTML output the conversion is ok, but in emails and javascripts there is no use for ä for example...

So: my suggestion: always skip the conversion to html
input-checks.php: function clean_input($input, $htmlencode = false)
so the special characters are put directly (as-is) into the database.

This works good in my new installation... all mails are ok, names, texts

Another thing: pma uses only utf-8 as character set. It seems that the database with ispcp still uses latin1(_swedish) for various texts - even if the db, tables and fileds are utf-8 "collated"....
With an
@$sql->Execute("SET NAMES 'utf8'");
just after the @$sql->connect in sql.php we force every mysql connection to use utf8 - and then we can see the right umlaut we put in...

(for updaters: the language file has to be uploaded again, and the email tpl texts... - and of cours all the names of the customers... - but it should be able to handle this...)

Your comments...???

/Joximu
01-28-2008 11:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BioALIEN Offline
Public Relations Officer
*****
Dev Team

Posts: 620
Joined: Feb 2007
Reputation: 5
Post: #2
RE: A suggestion concerning special chars (eg. umlaut)
+1 on converting the DB to utf-8 and keep it in line with phpmyadmin.
01-28-2008 12:01 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #3
RE: A suggestion concerning special chars (eg. umlaut)
Yes, there are many still some wrong characters in ispCP / e-Mails and so on. So we should try it as you said.

Quote:(for updaters: the language file has to be uploaded again, and the email tpl texts... - and of cours all the names of the customers... - but it should be able to handle this...)
Yes it is!

Greez BeNe
01-28-2008 06:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: A suggestion concerning special chars (eg. umlaut)
ok guys
just uploaded one part - the utf8 patch. A new config variable (for the one who don't want to use utf8 - or who did not realize the feature :-) DATABASE_UTF8 if set to yes, the connection to the database uses UTF8 charset. This is the base for some charset based tickets - I think its needed since its multilangual...

/J
02-07-2008 07:09 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)