Index: /XmlTools2/trunk/util.h
===================================================================
--- /XmlTools2/trunk/util.h	(revision 934)
+++ /XmlTools2/trunk/util.h	(revision 935)
@@ -44,5 +44,5 @@
 //// as the result will be always a.
 //inline const char* toCstr(const QString &myString){
-//    return myString.toLatin1().constData();
+//    return myString.toUtf8().constData();
 //}
 // Converts a std::string to QString
Index: /XmlTools2/trunk/utilxmltools.cpp
===================================================================
--- /XmlTools2/trunk/utilxmltools.cpp	(revision 934)
+++ /XmlTools2/trunk/utilxmltools.cpp	(revision 935)
@@ -46,5 +46,5 @@
     if(!QFile::exists(file+".bak")){
         if(!Util::backupFile(file)){
-            std::cerr << "Couldn't backup file '" << file.toLatin1().constData() << "'. Aborting." << std::endl;
+            std::cerr << "Couldn't backup file '" << file.toUtf8().constData() << "'. Aborting." << std::endl;
             exit(1);
         }
@@ -52,5 +52,5 @@
     else{
         if(verboseEnabled){
-            std::cout << "Backup file '" << file.toLatin1().constData() << "'' already exists. Skipping..." << std::endl;
+            std::cout << "Backup file '" << file.toUtf8().constData() << "'' already exists. Skipping..." << std::endl;
         }
     }
@@ -64,5 +64,5 @@
     try
     {
-        selectedNodes = doc.select_nodes(xPathExpression.toLatin1().constData());
+        selectedNodes = doc.select_nodes(xPathExpression.toUtf8().constData());
     }
 
@@ -91,5 +91,5 @@
     try
     {
-        selectedNode = doc.select_single_node(xPathExpression.toLatin1().constData());
+        selectedNode = doc.select_single_node(xPathExpression.toUtf8().constData());
     }
 
@@ -108,5 +108,5 @@
         if ((*currNode).name() == filters.getElementName() && (filters.getParentElementName() == "" || filters.getParentElementName() == (*currNode).parent().name())
                 && (filters.getAttributeName() == "" ||
-                    Util::toQString((*currNode).attribute(filters.getAttributeName().toLatin1().constData()).value()) == filters.getAttributeValue()) ){ // Seems node attribute must be converted to qtsring to remove \r\n needs to check in future!
+                    Util::toQString((*currNode).attribute(filters.getAttributeName().toUtf8().constData()).value()) == filters.getAttributeValue()) ){ // Seems node attribute must be converted to qtsring to remove \r\n needs to check in future!
 
             result << *currNode;
@@ -125,5 +125,5 @@
         if ((*currNode).name() == filters.getElementName() && (filters.getParentElementName() == "" || filters.getParentElementName() == (*currNode).parent().name())
                 && (filters.getAttributeName() == "" ||
-                    Util::toQString((*currNode).attribute(filters.getAttributeName().toLatin1().constData()).value()) == filters.getAttributeValue()) ){
+                    Util::toQString((*currNode).attribute(filters.getAttributeName().toUtf8().constData()).value()) == filters.getAttributeValue()) ){
             return *currNode;
         }
@@ -142,5 +142,5 @@
 void displaySuccessMessage(const int numberOperations, const QString &operation){
     std::cout << "------------------------------------------------------------------------" << std::endl;
-    std::cout << numberOperations << " " << operation.toLatin1().constData() << " operation(s) completed with success!" << std::endl;
+    std::cout << numberOperations << " " << operation.toUtf8().constData() << " operation(s) completed with success!" << std::endl;
     std::cout << "------------------------------------------------------------------------" << std::endl;
 }
@@ -148,6 +148,6 @@
 void displayErrorMessage(const QString& operation, const QString &message, bool exitProgram){
     std::cerr << "************************************************************************" << std::endl;
-    std::cerr << operation.toLatin1().constData() << " operation failed!" << std::endl << std::endl;
-    std::cerr << message.toLatin1().constData() << std::endl << std::endl;
+    std::cerr << operation.toUtf8().constData() << " operation failed!" << std::endl << std::endl;
+    std::cerr << message.toUtf8().constData() << std::endl << std::endl;
     if(exitProgram) std::cerr << "Aborting..." << std::endl;
     std::cerr << "************************************************************************" << std::endl;
Index: /XmlTools2/trunk/utilxmltools.h
===================================================================
--- /XmlTools2/trunk/utilxmltools.h	(revision 934)
+++ /XmlTools2/trunk/utilxmltools.h	(revision 935)
@@ -24,10 +24,10 @@
 inline void loadXmlFile(const QString &file, pugi::xml_document &document, pugi::xml_node &rootNode, bool backupsEnabled, bool verboseEnabled, const QString &operationForErrorMessage){
 
-    pugi::xml_parse_result result = document.load_file(file.toLatin1().constData());
+    pugi::xml_parse_result result = document.load_file(file.toUtf8().constData());
     rootNode=document.root();
 
     if(result.status==pugi::status_ok){
         if(verboseEnabled){
-            std::cout << "File '" << file.toLatin1().constData() << "' loaded with sucess." << std::endl;
+            std::cout << "File '" << file.toUtf8().constData() << "' loaded with sucess." << std::endl;
         }
     }
@@ -43,5 +43,5 @@
 
 inline void saveXmlFile(const QString &file, pugi::xml_document &document, const QString &operationForErrorMessage){
-    if(!document.save_file(file.toLatin1().constData(), "\t", pugi::format_indent | pugi::format_save_file_text | pugi::format_no_escapes)){ // output as the system new lines ending
+    if(!document.save_file(file.toUtf8().constData(), "\t", pugi::format_indent | pugi::format_save_file_text | pugi::format_no_escapes)){ // output as the system new lines ending
         UtilXmlTools::displayErrorMessage(operationForErrorMessage,"An error ocurred while saving '" + file + "' XML file");
     }
Index: /XmlTools2/trunk/xmlpatch.cpp
===================================================================
--- /XmlTools2/trunk/xmlpatch.cpp	(revision 934)
+++ /XmlTools2/trunk/xmlpatch.cpp	(revision 935)
@@ -9,5 +9,5 @@
 
     if(forceTargetFilesWildcard!=""){
-        std::cout << "User forced patch in the target file(s): " << forceTargetFilesWildcard.toLatin1().constData() << std::endl;
+        std::cout << "User forced patch in the target file(s): " << forceTargetFilesWildcard.toUtf8().constData() << std::endl;
     }
 
@@ -58,5 +58,5 @@
     }
 
-    result=newNode.load(xmlString.toLatin1().constData()); // load xml to insert
+    result=newNode.load(xmlString.toUtf8().constData()); // load xml to insert
 
     if(result.status!=pugi::status_ok){
Index: /XmlTools2/trunk/xmltools.cpp
===================================================================
--- /XmlTools2/trunk/xmltools.cpp	(revision 934)
+++ /XmlTools2/trunk/xmltools.cpp	(revision 935)
@@ -53,5 +53,5 @@
                 }
 
-                elements[j].text()=QString(Util::toQString(elements[j].text().as_string()) + " " + newValuesList[k]).toLatin1().constData(); // If it doesn't exists yet let's add it
+                elements[j].text()=QString(Util::toQString(elements[j].text().as_string()) + " " + newValuesList[k]).toUtf8().constData(); // If it doesn't exists yet let's add it
             }
         }
@@ -99,5 +99,5 @@
             if(elementChanged){ // If curr element changed update the XML
                 currValuesList.removeAll(""); // remove all files flagged to deletion
-                elements[j].text()=currValuesList.join(' ').toLatin1().constData();
+                elements[j].text()=currValuesList.join(' ').toUtf8().constData();
                 elementChanged=false;
             }
@@ -141,5 +141,5 @@
 
             if(elementChanged){ // If curr element changed update the XML
-                elements[j].text()=currValuesList.join(" ").toLatin1().constData();
+                elements[j].text()=currValuesList.join(" ").toUtf8().constData();
             }
             elementChanged=false;
@@ -174,8 +174,8 @@
         for(int j=0; j<elements.size(); j++){
             if(valuePositions!=""){
-                elements[j].text()=replaceSpecificPositions(value, Util::toQString(elements[j].text().as_string()),valuePositions).toLatin1().constData();
+                elements[j].text()=replaceSpecificPositions(value, Util::toQString(elements[j].text().as_string()),valuePositions).toUtf8().constData();
             }
             else{
-                elements[j].text()=value.toLatin1().constData();
+                elements[j].text()=value.toUtf8().constData();
             }
         }
@@ -215,5 +215,5 @@
             currXmlValue=MultiDimVar(Util::toQString(elements[1].text().as_string())); // the currXmlValue will begin to be the second one of the node
             newXmlValue=MultiDimVar::sub(lastXmlValue, MultiDimVar(diffBetweenOldAndNewValue));
-            elements[0].text() = newXmlValue.toString().toLatin1().constData(); // update the first eblement with the new one already
+            elements[0].text() = newXmlValue.toString().toUtf8().constData(); // update the first eblement with the new one already
         }
 
@@ -222,5 +222,5 @@
 
             newXmlValue=MultiDimVar::sum(newXmlValue,MultiDimVar::sub(currXmlValue,lastXmlValue));
-            elements[j].text() = newXmlValue.toString().toLatin1().constData(); // update element with the new value
+            elements[j].text() = newXmlValue.toString().toUtf8().constData(); // update element with the new value
             lastXmlValue=currXmlValue;
             currXmlValue=MultiDimVar(Util::toQString(elements[j+1].text().as_string()));
@@ -230,5 +230,5 @@
         // To update too last element (avoid out of bound because i+1)
         newXmlValue=MultiDimVar::sum(newXmlValue,MultiDimVar::sub(currXmlValue,lastXmlValue));
-        elements[elements.size()-1].text() = newXmlValue.toString().toLatin1().constData(); // update element with the new value
+        elements[elements.size()-1].text() = newXmlValue.toString().toUtf8().constData(); // update element with the new value
 
         UtilXmlTools::saveXmlFile(this->filesToProcess[i],this->document, "update-elements");
@@ -264,5 +264,5 @@
         // Override the tree with the inverted order
         for(int j=0; j<elements.size(); j++){
-            elements[j].text()= invertedElements[j].toLatin1().constData();
+            elements[j].text()= invertedElements[j].toUtf8().constData();
         }
 
