before inserting tag name
[default]Montreal/IN40RM/Quality/Montreal_Moulin/InspectionPoint/InspectionPointMeasures/Measure/Eau_combinée_Marmite_1/CharacteristicValue
This is almost certainly a database configuration problem (encoding), which cannot be changed on existing tables. You will have to shut down, move the data, recreate with a UTF8 encoding, and move the data back.
No, encoding in PostgreSQL is a database setting. Modern Linux distros commonly set up UTF8 encoding to avoid problems. Historical defaults for PostgreSQL are 7-bit ASCII or 8-bit Latin1, IIRC.
By shutting down, I mean the whole database and all of its tables will have to be fixed.
But look at your database’s properties to make sure this is the problem.
If you really have a misconfigured DB, I think the answer is no. You need some amount of downtime.
Consider standing up a new DB instance at a new address, use logical replication to duplicate the data, then switch to the new instance. That would minimize your downtime (a few minutes).
Hi, I have checked database is configured properly.
I have used unicode(tagname) to insert in to database. Now its inserting properly
But i am query the record from database
for example my record [ [default]Montreal/IN40RM/Quality/Montreal_Moulin/InspectionPoint/InspectionPointMeasures/Measure/Eau_combinée_Marmite _1/CharacteristicValue, [default]Montreal/IN40RM/Quality/Montreal_Moulin/InspectionPoint/InspectionPointMeasures/Measure/Eau_combinée_Marmite _1/Maxvalue]
tagpaths = selectpath.getValueAt(0,0)
#print type(tagpaths)
tagpaths= tagpaths[1:-1]
tagsplit= tagpaths.split(', ')
#print unicode(tagsplit).decode('utf-8')
listIn = tagsplit
listOut = [str(i) for i in listIn]
remove_duplicate = list(set(listOut))
#ds = system.dataset.toDataSet(['selectedPath'], [[x] for x in listOut])
ds = system.dataset.toDataSet(['selectedPath'], [[x] for x in remove_duplicate])