Page 1 of 1

Request for Unicode

Posted: Mon Nov 15, 2004 9:45 pm
by Guest007
Is there any chance the new 0.8 version of serendipity will give us full utf8 support (even without having iconv installed)?

stephan

Posted: Tue Nov 16, 2004 2:40 am
by tadpole
I was thinking about this, and I think it would be possible to create a native-PHP drop-in replacement for iconv using the LDML data over at the CLDR. We could, of course, convert to a more disk-space friendly format. What does everyone else think?

Migrating to UTF-8 is an extremely nice thing to do, I'm just not sure how best to go about it. I'm going to take this to the mailing list so we can have a nice healty flame-war ;)

Posted: Tue Nov 16, 2004 10:29 am
by Guest007
Well, others are considering it as well, maybe you can benefit from their mistakes :-)
Have a look at Alex' attempts to move over otf-8: http://www.alexking.org/blog/2004/11/08 ... -to-utf-8/

Posted: Tue Nov 16, 2004 10:34 am
by garvinhicking
Hm, isn't it as easy as:

1. Editing the language file you're using, set the CHARSET to UTF8
2. Switch your database engine to store in UTF8 format
3. Make your browser create UTF8 input

No recoding necessary...?

Regards,
Garvin.

Posted: Tue Nov 16, 2004 11:47 pm
by tadpole
For new blogs its easy. Migrating older blogs is somewhat more complicated because you have to convert charsets (hence the iconv stuff).

Also, I don't think MySQL < 4.1 supports UTF-8... how would we get around that?

Posted: Wed Nov 17, 2004 11:28 am
by garvinhicking
I think giving MySQL 4.1 a bunch of SQL statements with altering tables and collations/charsets should do.

And, well - I am not really for inventing legacy backward-compatibility stuff for "new trends" like "UTF8 everywhere". MySQL 4.1 is already declared stable, so I think we should focus on using this technology instead of looking at the past...that only creates redundancy and performance-drops, whereas MySQL 4.1 really nicely supports all that UTF8 stuff, if properly configured.

</rant> ;)

Posted: Thu Dec 23, 2004 1:41 am
by CapriSkye
i have utf-8 encoding for my chinese blog, everything looks pretty well, except the email notification. it doesn't show up right, changing encoding in my email client doesn't work either. all characters show up ok in the blog though, just not when getting notification about comments and trackbacks. i've seen other post mentioning about htmlentities(), should i change every htmlentities() into htmlspacialchars()? thanks

Posted: Thu Dec 23, 2004 3:53 pm
by garvinhicking
Well, we're not using htmlspecialchars() somewhere in that function, so that shouldn't be the problem.

I guess it's a problem because of missing charset language mailheaders. Please try this:

Open serendipity_config.inc.php, find $serendipity['mailheaders'] and change it to:

Code: Select all

/* Default mail headers */
$serendipity['mailheaders'] = 'X-Mailer: Serendipity/'. $serendipity['version'] . "\n"
                            . 'X-Engine: PHP/'. phpversion()
. "\n"
. 'Content-Type: text/plain; charset=' . LANG_CHARSET;
IF this works, please tell me so I can include it in the distro :)

Posted: Thu Dec 23, 2004 8:56 pm
by CapriSkye
garvinhicking wrote:Well, we're not using htmlspecialchars() somewhere in that function, so that shouldn't be the problem.

I guess it's a problem because of missing charset language mailheaders. Please try this:

Open serendipity_config.inc.php, find $serendipity['mailheaders'] and change it to:

Code: Select all

/* Default mail headers */
$serendipity['mailheaders'] = 'X-Mailer: Serendipity/'. $serendipity['version'] . "\n"
                            . 'X-Engine: PHP/'. phpversion()
. "\n"
. 'Content-Type: text/plain; charset=' . LANG_CHARSET;
IF this works, please tell me so I can include it in the distro :)

wow garvin you did it again! it's working except the FROM field. any idea? thank you very much