[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: Fwd: Re: Problem with folders in names which one there are national characters
From:       Toshitaka Fujioka <tositaka () soft ! kusa ! ac ! jp>
Date:       2001-01-19 12:22:12
[Download RAW message or body]

Hello.

Michael Häckel wrote:

> On Wednesday, 17. January 2001 10:48, Toshitaka Fujioka wrote:
> 
>> This patch is great!! Even Japanese (eucJP) works without a problem.
> 
> 
> Isn't that euc-jp ?
> Are you only speaking of the child folder problem, or are there others?
> 

It is child folder.

> 
>> The bug that I can't make child Folder of Japanese from Folder of
>> Japanese is fixed.
> 
> 
> Well, that was broken by your patch I committed last week. Before that, it 
> worked correctely at least until KMail is restarted :-)
> 

I'm sorry.  It is my investigation lack.


> 
>> However, program falls into infinite loop when I apply this patch in
>> CVS(15/01). Please apply a patch attaching.
> 
> 
> I still prefer my solution with KMFolder::location() returning the 8 bit 
> encoded string, because it is only used by system functions.
> I did again some testing and found indeed still a few problems with nested 
> folders which I hopefully fixed in the attached (much smaller) patch I also 
> put in CVS.
> If you find any problems with it, then please tell me exactely, what doesn't 
> work, thanks.
> 
> If I commit Sergey's 10KB patch, then I don't know, what new problems arise.
> 

There was not the problem even if I applied your patch.


I tried to make an internationalization patch (1.9KB) of folder, too.
(CVS 15/01)
There was not a problem in Japanese and English.
I attached a patch.


# Sorry, I can speak only Japanese. I can understand only some English.
# I apologize to my sentence if was the part which is rudeness.



["kdenetwork-kmail-folder-i18n-fix3.diff" (text/plain)]

diff -ur kdenetwork.org/kmail/kmfolder.cpp kdenetwork/kmail/kmfolder.cpp
--- kdenetwork.org/kmail/kmfolder.cpp	Fri Jan 19 20:04:27 2001
+++ kdenetwork/kmail/kmfolder.cpp	Fri Jan 19 20:11:32 2001
@@ -107,9 +107,9 @@
   QString sLocation(path());
 
   if (!sLocation.isEmpty()) sLocation += '/';
-  sLocation += name().local8Bit();
+  sLocation += name();
 
-  return sLocation;
+  return sLocation.local8Bit();
 }
 
 
@@ -120,10 +120,10 @@
 
   if (!sLocation.isEmpty()) sLocation += '/';
   sLocation += '.';
-  sLocation += name().local8Bit();
+  sLocation += name();
   sLocation += ".index";
 
-  return sLocation;
+  return sLocation.local8Bit();
 }
 
 //-----------------------------------------------------------------------------
@@ -133,25 +133,25 @@
 
   if (!sLocation.isEmpty()) sLocation += '/';
   sLocation += '.';
-  sLocation += name().local8Bit();
+  sLocation += name();
   sLocation += ".directory";
 
-  return sLocation;
+  return sLocation.local8Bit();
 }
 
 //-----------------------------------------------------------------------------
 KMFolderDir* KMFolder::createChildFolder()
 {
-  QString childName = "." + name().local8Bit() + ".directory";
+  QString childName = "." + name() + ".directory";
   QString childDir = path() + "/" + childName;
   bool ok = true;
 
   if (mChild)
     return mChild;
 
-  if (access(childDir, W_OK) != 0) // Not there or not writable
+  if (access(childDir.local8Bit(), W_OK) != 0) // Not there or not writable
   {
-    if (mkdir(childDir, S_IRWXU) != 0 && chmod(childDir, S_IRWXU) != 0)
+    if (mkdir(childDir.local8Bit(), S_IRWXU) != 0 && chmod(childDir.local8Bit(), S_IRWXU) != 0)
       ok=false; //failed create new or chmod existing tmp/
   }
 
@@ -161,7 +161,7 @@
     return 0;
   }
 
-  KMFolderDir* folderDir = new KMFolderDir(parent(), childName);
+  KMFolderDir* folderDir = new KMFolderDir(parent(), childName.local8Bit());
   if (!folderDir)
     return 0;
   folderDir->reload();

_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic