Convert Unicode characters to extended ASCII
问题 I have some binary data that had to be percent encoded to transfer to a remote service via a length-restricted query string parameter. When it comes back to me some of the values are encoded like this: \u2014 I wish to convert this value back to binary data. The Unicode character is the same as the original value in extended ASCII. How can I convert the above back to extended ASCII? Edit: Windows-1252 I would prefer a Javascript solution but can work with: PHP, Python, C, C++. 回答1: Here's the