"kyleabaker" wrote:
I'm parsing a JSON response and am finding that some year strings are returned with the following format in JSON:
...,"Year":"2009\u2013",...
When I set year = Content.Year I'd like to replace the \u with a dash (ex. 2009-2013), but its showing up as "2009-" currently and I'm not able to even see the second year. I see that \u appears to be an escape character. Any idea how I can get this date range formatted correctly?
You guys, beating the wrong horse here.
There is no year "2013" in the string - rather \u2013 is a single character,
EN DASH. Same as
chr(&h2013) and
chr(8211) if you want it in B/S. Due to looking as a year number, confusion is understandable. Apropos, \u2014 is EM DASH (dash with the width of letter "M").
It should be displayed as "2009-"; i suppose it means "2009 and later".
"kyleabaker" wrote:
Doesn't seem to be replacing anything and you can see the Ç char is printed for some reason.
Yes, it is not replacing anything, because there is no r"\u" in the string. The display of EN DASH as tabs+Ç is some idiosyncrasy of the console, which i rather not dig into (could be the telnet protocol, terminal emulator etc).