Ignore:
Timestamp:
04/28/10 11:51:37 (11 years ago)
Author:
kjdon
Message:

Need to convert query between unicode and utf8 for mgpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/phindaction.cpp

    r16310 r21973  
    3535#include "phindaction.h"
    3636#include "fileutil.h"
     37#include "gsdlunicode.h"
    3738
    3839phindaction::phindaction () {
     
    189190     *  DLConsulting 12-07-2004
    190191     */
     192   
    191193    if(!find_phrase_number_from_word(basepath, word, result)) {
    192194    output_error("phindaction: Fatal Error! Couldn't load index information in find_phrase_number_from_word()",
     
    196198   
    197199    if (result.empty()) {
    198       output_error("phindaction: The search term does not occur in the collection",
     200      output_error("phindaction: The search term ("+word+") does not occur in the collection",
    199201           textout, outconvert, disp, logout, XMLmode);
    200202      return true;
     
    516518  // mode 1 = casefolded, unstemmed search
    517519  UCArray ucquery;
    518   toUCArray(query, ucquery);
     520  // greenstone gives us the query encoded in unicode. We want utf8.
     521  char* utf8querystring=to_utf8(query).getcstr();
     522  SetCStr(ucquery, utf8querystring);
     523  delete []utf8querystring;
     524
     525  //toUCArray(query, ucquery);
    519526  QueryNode *queryTree = ParseQuery(ucquery, 1, 1, 4);
    520527     
Note: See TracChangeset for help on using the changeset viewer.