Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix a test failure in testNewFromString (#311) | Jan Engelhardt | 2024-06-11 | 1 | -1/+1 |
| | | | Fixes an oversight in d296c2d1. | ||||
* | vmime: prevent loss of a space during text::createFromString (#306) | Jan Engelhardt | 2024-05-21 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` mailbox(text("Test München West", charsets::UTF_8), "[email protected]").generate(); ``` produces ``` =?us-ascii?Q?Test_?= =?utf-8?Q?M=C3=BCnchen?= =?us-ascii?Q?West?= <[email protected]> ``` The first space between ``Test`` and ``München`` is encoded as an underscore along with the first word: ``Test_``. The second space between ``München`` and ``West`` is encoded with neither of the two words and thus lost. Decoding the text results in ``Test MünchenWest`` instead of ``Test München West``. This is caused by how ``vmime::text::createFromString()`` handles transitions between 7-bit and 8-bit words: If an 8-bit word follows a 7-bit word, a space is appended to the previous word. The opposite case of a 7-bit word following an 8-bit word *misses* this behaviour. When one fixes this problem, a follow-up issue appears: ``text::createFromString("a b\xFFc d")`` tokenizes the input into ``m_words={word("a "), word("b\xFFc ", utf8), word("d")}``. This "right-side alignment" nature of the whitespace is a problem for word::generate(): As per RFC 2047, spaces between adjacent encoded words are just separators but not meant to be displayed. A space between an encoded word and a regular ASCII text is not just a separator but also meant to be displayed. When word::generate() outputs the b-word, it would have to strip one space, but only when there is a transition from encoded-word to unencoded word. word::generate() does not know whether d will be encoded or unencoded. The idea now is that we could change the tokenization of ``text::createFromString`` such that whitespace is at the *start* of words rather than at the end. With that, word::generate() need not know anything about the next word, but rather only the *previous* one. Thus, in this patch, 1. The tokenization of ``text::createFromString`` is changed to left-align spaces and the function is fixed to account for the missing space on transition. 2. ``word::generate`` learns how to steal a space character. 3. Testcases are adjusted to account for the shifted position of the space. Fixes: #283, #284 Co-authored-by: Vincent Richard <[email protected]> | ||||
* | tests: switch a byte sequence in textTest (#305) | Jan Engelhardt | 2024-05-21 | 1 | -2/+2 |
| | | | | | Switch out the byte sequence by one that is simiarly random, but one which happens to decode as valid UTF-8, such that the expected and actual strings are shown with reasonable characters on a terminal. | ||||
* | Fixes/comments for guessBestEncoding (#304) | Jan Engelhardt | 2024-05-21 | 1 | -0/+12 |
| | | | | | | | | | | | * tests: add case for getRecommendedEncoding * vmime: avoid integer multiply wraparound in wordEncoder::guessBestEncoding If the input string is 42949673 characters long or larger, there will be integer overflow on 32-bit platforms when multiplying by 100. Switch that one computation to floating point. * vmime: update comment in wordEncoder::guessBestEncoding | ||||
* | #238 Fixed whitespace between encoded words | vincent-richard | 2020-06-16 | 1 | -0/+85 |
| | |||||
* | Code style and clarity. | Vincent Richard | 2018-09-05 | 1 | -159/+268 |
| | |||||
* | Always ignore newlines between words. | Vincent Richard | 2017-01-02 | 1 | -0/+4 |
| | |||||
* | Fixed #149: don't loose charset when fixing invalid broken words. | Vincent Richard | 2016-11-05 | 1 | -13/+66 |
| | |||||
* | Issue #103: fix badly encoded words. | Vincent Richard | 2015-02-16 | 1 | -0/+46 |
| | |||||
* | Fixed issue #98: support for wrongly padded B64 words. | Vincent Richard | 2015-01-14 | 1 | -0/+22 |
| | |||||
* | Added support for language specification in RFC-2047 encoded words and ↵ | Vincent Richard | 2014-06-30 | 1 | -1/+10 |
| | | | | RFC-2231 parameter values. | ||||
* | Do not make calls to setlocale() in a library. Use default user locale in ↵ | Vincent Richard | 2014-01-15 | 1 | -0/+24 |
| | | | | tests and examples. | ||||
* | Boost/C++11 shared pointers. | Vincent Richard | 2013-11-21 | 1 | -10/+10 |
| | |||||
* | Refactored unit tests. | Vincent Richard | 2013-03-08 | 1 | -5/+1 |
| | |||||
* | Fixed typo in function name. | Vincent Richard | 2013-02-25 | 1 | -3/+3 |
| | |||||
* | Message generation/parsing context. Charset conversion options. Preliminary ↵ | Vincent Richard | 2013-02-24 | 1 | -3/+76 |
| | | | | implementation of RFC-6532. | ||||
* | Updated copyright year and maintainer email address. | Vincent Richard | 2013-01-10 | 1 | -1/+1 |
| | |||||
* | Fixed encoding of whitespace. Fixed old test case. | Vincent Richard | 2011-06-26 | 1 | -1/+41 |
| | |||||
* | Fixed possible infinite loop (thanks to John van der Kamp, Zarafa). | Vincent Richard | 2011-01-21 | 1 | -0/+11 |
| | |||||
* | Fold non-encoded lines in the case there is no whitespace in them. | Vincent Richard | 2010-10-18 | 1 | -0/+14 |
| | |||||
* | Fixed missing whitespace in text parsing. | Vincent Richard | 2010-10-12 | 1 | -2/+52 |
| | |||||
* | Encode quotation marks in QP/RFC-2047. | Vincent Richard | 2010-10-12 | 1 | -0/+8 |
| | |||||
* | Always encode special charsets. | Vincent Richard | 2010-05-21 | 1 | -1/+32 |
| | |||||
* | Relicensed VMime under the GNU GPL version 3. Changed copyright year to 2009. | Vincent Richard | 2009-09-06 | 1 | -2/+2 |
| | |||||
* | Fixed extra space in subject (see ↵ | Vincent Richard | 2008-04-28 | 1 | -9/+43 |
| | | | | https://sourceforge.net/forum/message.php?msg_id=4894970). | ||||
* | Changed copyright year to 2008. | Vincent Richard | 2008-01-04 | 1 | -1/+1 |
| | |||||
* | Fixed incorrect white-space between words. | Vincent Richard | 2007-11-20 | 1 | -0/+26 |
| | |||||
* | Changed copyright year to 2007. | Vincent Richard | 2007-01-01 | 1 | -1/+1 |
| | |||||
* | Fixed bug #1096610: non-integral number of chars in RFC-2047 encoded words. | Vincent Richard | 2006-10-02 | 1 | -10/+35 |
| | |||||
* | Changed copyright year to 2006. | Vincent Richard | 2006-02-05 | 1 | -1/+1 |
| | |||||
* | Updated FSF address. | Vincent Richard | 2005-09-17 | 1 | -3/+7 |
| | |||||
* | Moved to CppUnit for unit tests framework. | Vincent Richard | 2005-08-25 | 1 | -196/+179 |
| | |||||
* | Added test case for '?' in the middle of the encoded buffer. | Vincent Richard | 2005-08-22 | 1 | -0/+4 |
| | |||||
* | Reference counting and smart pointers. | Vincent Richard | 2005-07-12 | 1 | -4/+4 |
| | |||||
* | Fixed a bug in word parsing. | Vincent Richard | 2005-06-13 | 1 | -0/+6 |
| | |||||
* | Updated VMime website URL. | Vincent Richard | 2005-03-18 | 1 | -1/+1 |
| | |||||
* | More unit tests for 'text' class. | Vincent Richard | 2005-03-15 | 1 | -3/+103 |
| | |||||
* | Added test for linear-white-space between encoded words. | Vincent Richard | 2005-03-14 | 1 | -0/+26 |
| | |||||
* | Changed year to 2005 in copyright header. | Vincent Richard | 2005-01-03 | 1 | -1/+1 |
| | |||||
* | Autotools and libtool support. | Vincent Richard | 2004-12-30 | 1 | -1/+1 |
| | |||||
* | Moved all header files to 'vmime/' directory. | Vincent Richard | 2004-12-26 | 1 | -3/+3 |
| | |||||
* | Default platform handlers (currently only POSIX). | Vincent Richard | 2004-12-18 | 1 | -2/+2 |
| | |||||
* | Moved encodeAndFold() and decodeAndUnfold() functions from "base.cpp" to ↵ | Vincent Richard | 2004-11-07 | 1 | -0/+2 |
| | | | | "text.cpp". | ||||
* | New build system for unit tests. | Vincent Richard | 2004-11-06 | 1 | -0/+133 |