Index: MpdlXmlTextServer.py
===================================================================
--- MpdlXmlTextServer.py	(revision 156)
+++ MpdlXmlTextServer.py	(revision 158)
@@ -53,5 +53,5 @@
         viewMode=  pageinfo['viewMode']
         tocMode = pageinfo['tocMode']
-        #characterNormalization = pageinfo ['characterNormalization']
+        characterNormalization = pageinfo ['characterNormalization']
         tocPN = pageinfo['tocPN']
         selfurl = self.absolute_url()
@@ -73,7 +73,5 @@
                         if href.startswith('page-fragment.xql'):
                             selfurl = self.absolute_url()            
-                            #pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&characterNormalization=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN,characterNormalization))
-                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN))
-                            
+                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&characterNormalization=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN,characterNormalization))
                             hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl)                                           
                 return serializeNode(pagenode)        
@@ -89,7 +87,5 @@
                         if href.startswith('page-fragment.xql'):
                             selfurl = self.absolute_url()       
-                            #pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&characterNormalization=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN,characterNormalization))
-                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN))
-                            
+                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&characterNormalization=%s'%(viewMode,queryType,query,pagesize,pn,tocMode,pn,tocPN,characterNormalization))
                             hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl)  
                         if href.startswith('../lt/lemma.xql'):
@@ -109,6 +105,5 @@
                     if hrefNode:
                         href = hrefNode.nodeValue
-                        #hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s&characterNormalization=%s'%(viewMode,tocMode,tocPN,pn,characterNormalization))
-                        hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s'%(viewMode,tocMode,tocPN,pn))             
+                        hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s&characterNormalization=%s'%(viewMode,tocMode,tocPN,pn,characterNormalization))             
                         if href.startswith('../lt/lex.xql'):
                             hrefNode.nodeValue = href.replace('../lt/lex.xql','%s/template/head_main_voc'%selfurl)         
@@ -136,5 +131,5 @@
         return docinfo
        
-    def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None):
+    def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization="reg"):
         """returns single page from fulltext"""
         docpath = docinfo['textURLPath']
@@ -143,5 +138,5 @@
         viewMode= pageinfo['viewMode']
         tocMode = pageinfo['tocMode']
-        #characterNormalization = pageinfo ['characterNormalization']
+        characterNormalization = pageinfo ['characterNormalization']
         tocPN = pageinfo['tocPN']
         selfurl = self.absolute_url()   
@@ -150,5 +145,5 @@
         else:
             textmode = mode
-        #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
+        logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
         textParam = "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn)
         if highlightQuery is not None:
@@ -171,5 +166,5 @@
                         href= hrefNode.nodeValue
                         if href.startswith('#note-'):
-                            hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,tocPN,pn))
+                            hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&characterNormalization=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,characterNormalization,tocPN,pn))
                 return serializeNode(pagenode)
         if mode == "xml":
@@ -221,5 +216,5 @@
                             l.setAttributeNS(None, 'onClick', 'popupWin.focus();')   
                         if href.startswith('#note-'):
-                            hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,tocPN,pn))    
+                            hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&characterNormalization=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,characterNormalization,tocPN,pn))    
                 return serializeNode(pagenode)
         return "no text here"
@@ -308,5 +303,5 @@
         selfurl = self.absolute_url()  
         viewMode=  pageinfo['viewMode']
-        #characterNormalization =pageinfo ['characterNormalization']
+        characterNormalization =pageinfo ['characterNormalization']
         tocMode = pageinfo['tocMode']
         tocPN = pageinfo['tocPN']  
@@ -314,9 +309,8 @@
         data = self.getServerData("doc-query.xql","document=%s&queryType=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath,queryType, pagesize, pn))  
 
-        #page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&characterNormalization=%s'%(selfurl,url, viewMode, tocMode, tocPN, characterNormalization))
-        page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s'%(selfurl,url, viewMode, tocMode, tocPN))
+        page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&characterNormalization=%s'%(selfurl,url, viewMode, tocMode, tocPN, characterNormalization))
         text = page.replace('mode=image','mode=texttool')
-        #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
-        #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
+        logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
+        logging.debug("documentViewer (characterNormalization) text: %s"%(text))
         return text
     
Index: documentViewer.py
===================================================================
--- documentViewer.py	(revision 157)
+++ documentViewer.py	(revision 158)
@@ -679,5 +679,5 @@
         return docinfo
                
-    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None):
+    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None, characterNormalization=None):
         """returns pageinfo with the given parameters"""
         pageinfo = {}
@@ -702,5 +702,5 @@
         pageinfo['viewMode'] = viewMode
         pageinfo['tocMode'] = tocMode
-        #pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization','')
+        pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization','')
         pageinfo['query'] = self.REQUEST.get('query',' ')
         pageinfo['queryType'] = self.REQUEST.get('queryType',' ')
@@ -713,5 +713,7 @@
         toc = int (pageinfo['tocPN'])
         pageinfo['textPages'] =int (toc)
-              
+        
+       
+        
         if 'tocSize_%s'%tocMode in docinfo:
             tocSize = int(docinfo['tocSize_%s'%tocMode])
