wanleung/libcangjie — pull request #5 by antonyho (2012-12-07 08:35:44+00:00)
Title: Revert previous patch and submit a new fix for garbage UTF-8 bytes

The previous patch was not fixing the problem in right direction.
The problem is because BerkeleyDB stores and retrieves data given by user. The UTF-8 char bytes are given no null byte. The String::string() stops at '\0'. Therefore, it sometimes does end at right position. Since, Dbt::get_size() can return the right data size. This fix is more accurate and
elegant.