[imp] address book -> compose window

Rong-En Fan rafan at csie.org
Tue Sep 7 20:49:34 PDT 2004

On Tue, Sep 07, 2004 at 02:37:53PM -0400, Chuck Hagenbuch wrote:
> Quoting Rong-En Fan <rafan at csie.org>:
> >Current implementation in contacts.inc is
> >not multibyte friendly. The reason is that,
> >the option's value uses php's rawurlencode()
> >which encode string byte by byte. Then,
> >the value goes to updateMessage(), it uses
> >unescape() to decode the option value.
> >But in ECMA spec, string is multibyte-aware,
> >when it comes to escape(), it produces output
> >like %uXXXX (You can take a look at mozilla's
> >source: js/jsstr.c).
> What about replacing the rawurlencode() calls with calls to MIME::encode()?
> We might then need a javascript version of MIME::decode(), I guess, but 
> it would
> take care of the multibyte issues, would it not?
> -chuck

But a problem is that you can not assemble multibyte
words from some ascii values in javascript. I have
tried to replace rawurlencode() with base64_encode
and then do base64_decode in javascript, the multibyte
words still become a mess... 

More information about the imp mailing list