Bug 114825 - Automatic replacement of accented characters not working
Summary: Automatic replacement of accented characters not working
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-21 17:41 UTC by Jeremy
Modified: 2008-01-16 20:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
document.diff (362 bytes, text/x-diff)
2005-11-04 22:04 UTC, András Manţia
Details
quanta_init.diff (577 bytes, text/x-diff)
2005-11-04 22:04 UTC, András Manţia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy 2005-10-21 17:41:01 UTC
Version:           3.4.3 (using KDE KDE 3.4.3)
Installed from:    Ubuntu Packages
OS:                Linux

In recent versions of quanta there has been the option, 'Settings...' 'Configure Quanta...' 'Tag style' 'Automatic replacement of the accented characters'. This is not working in Quanta 3.4.3 that comes from the Ubuntu 5.10 repositories.

I am using Kubuntu 5.10 with KDE 3.4.3.
Comment 1 Michael Hulet 2005-11-04 08:24:54 UTC
Confirming the bug. I'm using Quanta+ 3.4.3 delivered with Ubuntu 5.10.

I uninstalled the package and built Quanta+ 3.4.2 from source to check if it could be resolved. But it didn't.

I really need this functionality for my work.
Comment 2 András Manţia 2005-11-04 09:37:41 UTC
There was a bug when I wanted to restore the functionality. So you have 
to manually add the following to the local quantarc file (after you 
closed Quanta), under 
[General Options]
Replace Accented Chars=true
Replace Chars Not In Current Encoding=true

Does it work with these settings_
Comment 3 Jeremy 2005-11-04 09:51:24 UTC
Thank you for your answer. I opened ~/.kde/share/config/quantarc and found where it said:
Replace Accented Chars=true
Replace Chars Not In Current Encoding=false
so I edited it to read:
Replace Accented Chars=true
Replace Chars Not In Current Encoding=true
then saved and closed. Then I opened Quanta, but it still didn't work. I then closed quanta and re-opened quantarc and found that it had been changed back to:
Replace Accented Chars=true
Replace Chars Not In Current Encoding=false
I then repeated the whole process just to be sure, and the same happened again.
Comment 4 András Manţia 2005-11-04 10:04:30 UTC
Hm, in this case it might be possible that you need to wait until 3.5 
comes out or patch the source yourself. I will post the patch soon.
Comment 5 Jeremy 2005-11-04 10:07:07 UTC
When is 3.5 due?
Comment 6 Michael Hulet 2005-11-04 15:24:08 UTC
Tried same process than Jeremy in comment #3. Same (bad) result.
And so, same question: when is next version due?
Comment 8 András Manţia 2005-11-04 22:04:00 UTC
Apply the following patches plus follow my previous instructions in 
order to get this working. It will work in 3.5


Created an attachment (id=13279)
document.diff

Created an attachment (id=13280)
quanta_init.diff
Comment 9 András Manţia 2005-11-04 22:04:10 UTC
SVN commit 477723 by amantia:

The right implementation of replace accented chars and replace chars not in the current encoding.

BUG: 114825

 M  +11 -10    document.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/src/document.cpp #477722:477723
@@ -848,19 +848,20 @@
         return;
       }
     }
-    if (qConfig.replaceAccented)
+  }
+  if (qConfig.replaceAccented)
+  {
+    uint c = string[0].unicode();
+    if (c > 191)
     {
-      uint c = string[0].unicode();
-      if (c > 191)
-      {
-        m_replaceLine = line;
-        m_replaceCol = column;
-        m_replaceStr = QString("&#%1;").arg(c);
-        QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
-        return;
-      }
+      m_replaceLine = line;
+      m_replaceCol = column;
+      m_replaceStr = QString("&#%1;").arg(c);
+      QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+      return;
     }
   }
+  
 
  if ( (string == ">") ||
       (string == "<") )
Comment 10 Jeremy 2005-11-04 22:09:49 UTC
Thanks. As 3.5 is due within a few weeks and I have no idea how or where to apply the patches, I think I'll wait.
Comment 11 Michael Hulet 2005-11-05 12:43:07 UTC
Thanks, Andras, this is great! 

But I'm looking on my 3.4.2 document.cpp source code and it doesn't look the same. For wich version is this patch?
Comment 12 András Manţia 2005-11-05 12:52:24 UTC
The patch is for 3.4.3.

Andras
Comment 13 Manoel Benito Hernandes de Carvalho 2006-08-29 18:31:03 UTC
I´m using 3.5.2 on Ubuntu (Dapper Drake) and still not working...
Comment 14 Diego Rubert 2008-01-16 20:04:11 UTC
I´m using 3.5.8 on Debian and still not working too...