0
I have an API on Node that connects to a Postgresql database using the "pg" module, where the database in question uses the "SQL_ASCII" encoding. I do not have the option to change the encoding of the bank because it is the same of the city hall of my city.
When I do a search in a table/field that contains special characters such as "Administração", I have the following return: "Administr\\xe7\\xe3o".
From the research I’ve been doing, \xe7 is the Unicode code of the letter ç, I can even translate this string if I use Javascript methods such as decodeURIComponent("\xe7"),
However, the answer I have is with TWO bars ("\\xe7"), so all the methods I tried to use didn’t work. Obviously I also tried to do the '\\xe7'.replace('\\\\\', '\\') to then try to use Code, but I was unsuccessful.
When I place this string in an HTML page (utf8), it shows as follows: "Administr\xe7\xe3o" with 1 bar, and my goal is to show the correct word.
Where am I going wrong?


It worked! Thank you so much! save me! Really I was confusing then. If it’s not too much to ask, could you explain this regex that was made? or some link where I can learn more about it. Thank you!
– Yuri Bento