Re: [gmime-devel] Unecscaped Unicode



Thanks for thinking about this, Jeff. I want to emphasize that the current implementation works, at least as long as there are no DEL characters in the email. (And if you send an email with DEL characters, you deserve to have it mangled!) So anything you do for GMime should make sense in the larger sense, and not just be a fix for this (non-)problem.

On 02/22/2013 12:08 PM, Jeffrey Stedfast wrote:
Hmm, I think I understand what you're doing better now but I'm not sure
I want to have a flag to define the quote char. That doesn't seem like
the right solution.

Could you, instead of using a magic char, using a magic string? If you
generate a randomish string then you could be fairly confidant that it
wouldn't be in the message text. Then you could just look for that same
string in the blockquote filter.

Looking for a string is slightly more complicated than for a single character, but there's no reason that wouldn't work. But if I'm going to look for a string, I might as well just put in a unicode control character before the FilterHTML and look for the character entity on the other side.

I could also add a flag like GMIME_FILTER_HTML_ALLOW_UTF8 which would
pass utf8 through without encoding as entities:

This would make this last approach a bit more symmetric, since we'd be looking for the same thing on either side. If it ends up in FilterHtML, we might utilize it. But only bother if you see this as a generally useful feature -- there's plenty of ways to do what we need to right now.

Thanks,
Robert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]