Changeset 26162 for main


Ignore:
Timestamp:
09/11/12 11:30:29 (8 years ago)
Author:
kjdon
Message:

in unicode_to_utf8_word, the max_output_length is the maximum length of the actual string, not including the length, so shouldn't add one to the length

Location:
main/trunk/greenstone2/common-src/indexers/mgpp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mgpp/lib/simplefrenchstem.cpp

    r16583 r26162  
    6767
    6868  /* re-code, make sure the result is not longer than the input */
    69   unicode_to_utf8_word (out, word, word[0]+1);
     69  //unicode_to_utf8_word (out, word, word[0]+1);
     70  // The max_output_length (3rd param) for unicode_to_utf8 is the max length of
     71  // the string, not including the length
     72  unicode_to_utf8_word (out, word, word[0]);
    7073}
  • main/trunk/greenstone2/common-src/indexers/mgpp/text/stemmer.cpp

    r16583 r26162  
    5353
    5454  /* re-code */
    55   unicode_to_utf8_word (out, word, word[0]+1);
     55  //unicode_to_utf8_word (out, word, word[0]+1);
     56  // The max_output_length (3rd param) for unicode_to_utf8 is the max length of
     57  // the string, not including the length
     58  unicode_to_utf8_word (out, word, word[0]);
    5659}
    5760
Note: See TracChangeset for help on using the changeset viewer.