I have a bunch of unicode strings in my data that I need to transfer from my django view to a template for use in a JavaScript script that transmits it back and forth to the Internet.
The problem is that strings must be in Unicode JavaScript form, but I get strings with u prefix from python.
For example, for the string mężczyźni , Python saves it as u'm \ u0119 \ u017cczy \ u017ani ' , but when it is passed to the template, it does not remove the u prefix, which creates problems for JavaScript when processing it. I want this to be just 'm \ u0119 \ u017cczy \ u017ani' so that the JavaScript code in the template can use it.
I tried using urqluote, smart_unicode, force_unicode, but could not find a solution or even hack.
What should I do?
javascript python django unicode
Knight samar
source share