[pLog-svn] umlauts / utf8 / moblog plugin

Mark Wu markplace at gmail.com
Thu Feb 2 07:38:20 GMT 2006


Hi Oscar:

Back to more low level problem, will we only support utf-8 in 1.1 or 1.2?
...

If yes, I think I can try to borrow some code from docuwiki and joomla, we
can have a generic way to deal with utf-8.

There are several places we can some enhancement, if we stick with utf-8
only:

1. we can write a generic converter to convert all encodings to utf-8
(mbstring first, then iconv, then... No convert)
2. We can have more generic string handling functions, it can deal with
utf-8 string (mbstring, iconv the utf-8 string lib (from docuwiki)). We
won't have odd characters after truncate() or substr() ...
3. We can change our xml-rpc default encoding to utf-8. We don't need to
worry about the encoding anymore
4. We can use encodeURIComponent() instead of escape() in javascript, it
make our UI support more easily 
.....

But, there are 1 big drawback we need to consider:
** How to migrate other encoding (in lifetype 1.0.x) to utf-8 (in lifetype
1.1 or 1.2)? This should be big challenges for us.

Mark

> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net 
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of 
> Oscar Renalias
> Sent: Thursday, February 02, 2006 2:41 PM
> To: plog-svn at devel.lifetype.net
> Subject: Re: [pLog-svn] umlauts / utf8 / moblog plugin
> 
> This is a bit tricky, because we need to convert from the 
> encoding that the message is using to the encoding that we're 
> using in the blog. So if the message is encoded with utf-8 
> and the destination blog uses big5 for chinese characters, we 
> should perform such conversion.
> It's not enough to just call utf8_decode, because the 
> destination encoding of the blog could be whatever...
> 
> Oscar
> 
> On 2/2/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
> >
> > Starting to delve into the world of UTF8, of which I know 
> nothing about.
> >
> > See this blog, where the posts have all been made by moblog.
> >
> > http://devel.limedaley.com/1.0.3/index.php?blogId=1
> >
> > The way I fixed the body of the most recent post is by calling 
> > utf8_decode in
> > _decodeBody() in the mime class of the moblog plugin.  I assume I 
> > can't call utf8_decode all the time, but have to decide 
> whether or not 
> > the text is in utf8 format, and then decode it as appropriate?
> >
> > I will look into it further, but you guys know more about 
> this sort of 
> > stuff than I do.
> >
> >
> > **************************************
> > Jon Daley
> > http://jon.limedaley.com/
> >
> > A nuclear war can ruin your whole day.
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn



More information about the pLog-svn mailing list