Bug 140929 - Encoding error in the Kate session name when opening it from the new applet
Summary: Encoding error in the Kate session name when opening it from the new applet
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal with 12 votes (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-30 23:35 UTC by Iñaki Baz Castillo
Modified: 2007-02-09 19:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix problem with sessions which contains non ASCII symbols in names (607 bytes, patch)
2007-02-09 15:57 UTC, Sergey A. Sukiyazov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iñaki Baz Castillo 2007-01-30 23:35:17 UTC
Version:           2.5.6 (using KDE 3.5.6, Kubuntu (edgy) 4:3.5.6-0ubuntu1~edgy1)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17-10-386

I've a Kate session called "Replicación LDAP" (note the "ó").

When I open it from the new Kate applet in the kicker, it appears empty because the session name is "Replicación LDAP" (note the encoding error in "ó").

I use Kubuntu 6.10 with KDE 3.5.6. Of course I use UTF-8 and don't have encoding problems at all, so I suppose that the kicker Kate's applet does something worng about the encoding.
Comment 1 Sergey A. Sukiyazov 2007-02-09 15:57:42 UTC
Created attachment 19599 [details]
Fix problem with sessions which contains non ASCII symbols in names

At kdebase-3.5.6/kate/app/kateapp.cp (near line 166) incorect cornersion from
QCString to QString. By default ISO-8859-1 is used, but need locale depended
encoding. Correct solution is use QString::fromLocal8Bit(...) instead
constructor QString(const char *) (aka default type casting)
Comment 2 Sergey A. Sukiyazov 2007-02-09 16:00:09 UTC
Sorry, I forget... Patch which correct problem must be found in attachment :-)
Comment 3 Dominik Haumann 2007-02-09 17:42:23 UTC
SVN commit 631968 by dhaumann:

honor current locale for QCString to QString conversion.
Thanks for the patch, looking forward to more :)
BUG: 140929

 M  +1 -1      kateapp.cpp  


--- branches/KDE/3.5/kdebase/kate/app/kateapp.cpp #631967:631968
@@ -166,7 +166,7 @@
   // user specified session to open
   if (m_args->isSet ("start"))
   {
-    sessionManager()->activateSession (sessionManager()->giveSession (m_args->getOption("start")), false, false);
+    sessionManager()->activateSession (sessionManager()->giveSession (QString::fromLocal8Bit(m_args->getOption("start"))), false, false);
   }
   else
   {
Comment 4 Dominik Haumann 2007-02-09 17:50:59 UTC
SVN commit 631971 by dhaumann:

honor locale for QByteArray -> QString conversion.
CCBUG: 140929

 M  +1 -1      kateapp.cpp  


--- trunk/KDE/kdebase/kate/app/kateapp.cpp #631970:631971
@@ -179,7 +179,7 @@
   // user specified session to open
   if (m_args->isSet ("start"))
   {
-    sessionManager()->activateSession (sessionManager()->giveSession (m_args->getOption("start")), false, false);
+    sessionManager()->activateSession (sessionManager()->giveSession (QString::fromLocal8Bit(m_args->getOption("start"))), false, false);
   }
   else if (!m_args->isSet( "stdin" ) && (m_args->count() == 0)) // only start session if no files specified
   {
Comment 5 Sergey A. Sukiyazov 2007-02-09 19:58:30 UTC
looking forward to more? See https://bugs.kde.org/show_bug.cgi?id=141340 for more locale specific improvements :-)