[Rqda-commits] r48 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 16 02:04:35 CET 2008


Author: wincent
Date: 2008-12-16 02:04:35 +0100 (Tue, 16 Dec 2008)
New Revision: 48

Modified:
   pkg/ChangeLog
   pkg/R/CaseFun.R
   pkg/R/FilesFun.R
Log:


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2008-12-16 00:40:11 UTC (rev 47)
+++ pkg/ChangeLog	2008-12-16 01:04:35 UTC (rev 48)
@@ -1,6 +1,7 @@
 2008-12-15
 	* Add help of GetCodingTable.
 	* Fix bugs of "Web Search-Baidu" and "Web Search-Sohu" of the case popup menu (now works for UTF-8 locale).
+	* Fix bugs of "Add to case/file category" of the fils popup menu.
 
 2008-12-14
 	* Add help of SearchFiles and GetFileId.

Modified: pkg/R/CaseFun.R
===================================================================
--- pkg/R/CaseFun.R	2008-12-16 00:40:11 UTC (rev 47)
+++ pkg/R/CaseFun.R	2008-12-16 01:04:35 UTC (rev 48)
@@ -55,9 +55,9 @@
     
     RunOnSelected(cases$name,multiple=FALSE,enclos=CurrentFrame,expr={
       if (Selected!=""){
-        Selected <- iconv(Selected,to="UTF-8")
-        caseid <- cases$id[cases$name %in% Selected]
-        
+        ##Selected <- iconv(Selected,to="UTF-8")
+        Encoding(Selected) <- "UTF-8"
+        caseid <- cases$id[cases$name %in% Selected]       
         exist <- dbGetQuery(.rqda$qdacon,sprintf("select fid from caselinkage where status=1 and fid in (%s) and caseid=%i",paste("'",fid,"'",sep="",collapse=","),caseid))
         if (nrow(exist)!=length(fid)){
           ## write only when the selected file associated with specific case is not in the caselinkage table

Modified: pkg/R/FilesFun.R
===================================================================
--- pkg/R/FilesFun.R	2008-12-16 00:40:11 UTC (rev 47)
+++ pkg/R/FilesFun.R	2008-12-16 01:04:35 UTC (rev 48)
@@ -304,7 +304,8 @@
     CurrentFrame <- sys.frame(sys.nframe())
     RunOnSelected(Fcat$name,multiple=TRUE,enclos=CurrentFrame,expr={
     if (Selected!=""){ ## must use Selected to represent the value of selected items. see RunOnSelected() for info.
-      Selected <- iconv(Selected,to="UTF-8")
+      ##Selected <- iconv(Selected,to="UTF-8")
+      Encoding(Selected) <- "UTF-8"
       Fcatid <- Fcat$catid[Fcat$name %in% Selected]
       exist <- dbGetQuery(.rqda$qdacon,sprintf("select fid from treefile where status=1 and fid in (%s) and catid=%i",paste("'",fid,"'",sep="",collapse=","),Fcatid))
     if (nrow(exist)!=length(fid)){



More information about the Rqda-commits mailing list