Hi all,

I was fixing search through the notes with non-Latin text and have found out that it was actually stored as HTML character codes (e.g. ма). I had to remove this conversion and everything seems to work, but I wonder why this was introduced. So it would be great if those who are using non-Latin notes could test this change (see the attached path or basket trunk at github.com/gl-bars/basket/tree/basket-gleb-qtc).

*Backup BasKet data before the experiments!*

After editing of non-Latin notes basket*/note*.html files will be overwritten (actual editing is not needed, click on note & esc is enough) and filter functionality should start working for those notes.

This convert functionality was added in github.com/kelvie/basket/commit/125be15b36a549edf4ee0553d9fe01a5fb6f4aab in 2011 and I don't see the reason for it... For me, the current variant (w/o conversion) works, but I will test for a longer time.

Cheers,
Gleb
diff --git a/src/notecontent.cpp b/src/notecontent.cpp
index 9df9abf..b286e95 100644
--- a/src/notecontent.cpp
+++ b/src/notecontent.cpp
@@ -1138,10 +1138,6 @@ QString HtmlContent::messageWhenOpening(OpenMessage 
where)
 void HtmlContent::setHtml(const QString &html, bool lazyLoad)
 {
     m_html = html;
-    QRegExp rx("([^\\x00-\\x7f])");
-    while (m_html.contains(rx)) {
-        m_html.replace( rx.cap().unicode()[0], 
QString("&#%1;").arg(rx.cap().unicode()[0].unicode()) );
-    }
     m_textEquivalent = toText(""); //OPTIM_FILTER
     if (!lazyLoad)
         finishLazyLoad();
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Basket-devel mailing list
Basket-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basket-devel

Reply via email to