diff --git a/honoka/plugins/anthyconversion.cpp b/honoka/plugins/anthyconversion.cpp index b07fd71..1a36f80 100644 --- a/honoka/plugins/anthyconversion.cpp +++ b/honoka/plugins/anthyconversion.cpp @@ -171,11 +171,19 @@ WideString w; m_iconv.convert(w,String(res)); l.kouho.push_back(w); - if ((w == yomiText.substr(slen,w.length())) && (l.Yomi.length() < w.length())) { - l.Yomi = w; - slen += w.length(); - } + //if ((w == yomiText.substr(slen,w.length())) && (l.Yomi.length() < w.length())) { + // l.Yomi = w; + // slen += w.length(); + //} } + char res[256]; + int c = anthy_get_segment(context,i,NTH_UNCONVERTED_CANDIDATE,0,0); + if (c > 255) c = 255; + anthy_get_segment(context,i,NTH_UNCONVERTED_CANDIDATE,res,c + 1); + WideString w; + m_iconv.convert(w,String(res)); + l.Yomi = w; + convResult.push_back(l); } }