[ZendTo] Re: Encoding for Short note to the recipients

Barry Kwok hkeasytech at gmail.com
Sat Mar 5 03:33:33 GMT 2011


Jules,

What I did:

1. Add a meta tag in template/header.tpl
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

2. In templates/dropoff_list.tpl line 19, change to

<td class="UD_form_lined">{foreach from=$d.recipients
item=r}{$r.name|html_entity_decode}
&lt;{$r.email}&gt;<br/>{/foreach}</td>

3. In templates/show_dropoff.tpl file,
In line 90, change to
{$r.0|html_entity_decode} ({$r.1})<br />

In line 97, change to
<td colspan="2"><textarea readonly="yes" style="width: 425px; height:
200px;">{$note|html_entity_decode}</textarea></td>

For email, change the subject line for utf-8 encode
In file lib/NSSDropbox.php line 732, change to

$subject="=?UTF-8?B?".base64_encode(html_entity_decode($subject))."?=",

There are some other places that to be internationalized friendly. But I
think we can wait until the Zendto interface will "internationalized" some
day. :-)


Barry

On Fri, Mar 4, 2011 at 5:43 PM, Jules <Jules at zend.to> wrote:

>
>
> On 04/03/2011 09:40, Barry Kwok wrote:
>
> Jules,
>
>  I will start to study the code. But do you have any idea which file(s)
> should I start?
>
> www/dropoff.php and lib/NSSDropoff.php should be the home of most/all of
> it. Plus possibly SQLite.pm and MySQL.pm if you need to change the database
> code (which I hope you won't, as it makes upgrades a whole lot harder).
>
> Jules.
>
>
>
>
> On Fri, Mar 4, 2011 at 4:53 PM, Jules <Jules at zend.to> wrote:
>
>>  Agreed. Any idea how I go about doing that? I'm not a PHP expert, my
>> background is mostly Perl (from writing MailScanner among other projects
>> over many years).
>>
>> I need to html-encode them or else people can put HTML tags in them, which
>> would be *very* bad.
>>
>>
>> On 04/03/2011 03:43, Barry Kwok wrote:
>>
>>  When writing non English note (eg chinese) to the recipients. I found
>> that
>>
>>  1. The email message to the recipients display correctly (but no charset
>> defined)
>>
>>  2. The note message show on the web is "html entity encoded"  and cannot
>> read properly.
>>
>>
>>  I would like to suggest to use utf-8 encoding for both email message and
>> in the web
>>
>>
>>
>>
>>  Barry
>>
>>
>>
>>
>> _______________________________________________
>> ZendTo mailing listZendTo at zend.tohttp://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>>
>>
>> Jules
>>
>> --
>> Julian Field MEng CITP CEngwww.Zend.To
>>
>> Follow me at twitter.com/JulesFM
>> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>>
>> 'All programs have a desire to be useful' - Tron, 1982
>>
>>
>> _______________________________________________
>> ZendTo mailing list
>> ZendTo at zend.to
>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>>
>
>
> _______________________________________________
> ZendTo mailing listZendTo at zend.tohttp://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>
>
> Jules
>
> --
> Julian Field MEng CITP CEngwww.Zend.To
>
> Follow me at twitter.com/JulesFM
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>
> 'All programs have a desire to be useful' - Tron, 1982
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20110305/14a15052/attachment.html 


More information about the ZendTo mailing list