I’m trying to get some data from a web server, and get this data on perspective. But during the testes some data are in unicode formated with scape \u, I tried some ways to show the “right” text but no success, follow the example:
value = 'Folder Name: 8. Manuten\u00e7\u00e3o'
type(value)
print value
value2 = unicode(value,'utf-8')
type(value2)
print value2 #No Work
print u'Folder Name: 8. Manuten\u00e7\u00e3o' #Works OK
I I type directly on print the string with u’ works normal, but if try the same with a variable not work.
Or use the __future__ import to always get unicode. The problem is that you must start with unicode. Once in a classic str(), you’ve already broken your chance to interpret the unicode correctly. You can’t do it after the fact.
So, if you are pulling from a web API, you must use methods that interpret UTF-8 as the data arrives. Please show the rest of your code, and explain the data flow more completely.
I getting data from Microsoft Graph, to get DriveItens from specific Drive, They will return a Json with the information from the Sub Folder of a Document Library at SharePoint, and the information of Files in Root of drive
In the Expression Binding I can't enter unicode with a "u" prefix. Instead, I must hunt on the web for the rendered unicode, copy it, and paste into the Expression Binding text area. #1 How do I enter raw unicode?
I found a degree symbol and it works in my project's Label. However, when I inherit that project into a parent project, the symbol has an "A" with a hat above it before the degree symbol. Why did that happen? #2 How do I get inherited projects to display the exact same unicode?