On Sun, Apr 19, 2009 at 12:11:16AM +0800, Ryan Li wrote: > Hi Chris, > > I am interested in the null terminator bug you mentioned, since I have > encountered one too, not sure whether they're the same issue. When I use > the latest git source to redirect the output to file, the file cannot be > recognized as UTF-8(both by gedit and Emacs), but okay with cat, less > and direct output. I think it's due to NULL characters at the end of the > Body string, and even in the middle of it, so I made a patch to fix > this. Along with iconv for non-UCS2 Bodies.
I used the strnlen() function. See the latest commit in the git tree with 'git log -p' With UCS2 strings, maybe a function like wcsnlen would work for us. I'd rather not add for() loops to various parts of the code, if we can use strnlen() and wcsnlen(), so I haven't applied your patch. - Chris ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Barry-devel mailing list Barry-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/barry-devel