Questions tagged [unicode-escapes]

Use this tag for questions related to Unicode Escapes, a Unicode character Escape sequence represents a Unicode character.

Quoting the MSDN page:

A Unicode escape sequence represents the single Unicode character formed by the hexadecimal number following the "\u" or "\U" characters. Since C# uses a 16-bit encoding of Unicode code points in characters and string values, a Unicode character in the range U+10000 to U+10FFFF is not permitted in a character literal and is represented using a Unicode surrogate pair in a string literal. Unicode characters with code points above 0x10FFFF are not supported.

Notice that is used in its general meaning, thus you are encouraged to tag your question with the corresponding programming environment as well.

318 questions
2
votes
2 answers

Unicode escape for @ symbol displays as Chinese character

The Unicode character for @ symbol is 40 but when I tried it, it just display like chinese character. p::after{ content: 'foo\40bar.com'; }

Email:

Navin Rauniyar
  • 10,127
  • 14
  • 45
  • 68
2
votes
1 answer

json.loads with escape characters

I'm trying to convert this string into python dict: q = '{"request_body": "{\\x22username\\x22:\\x222\\x22,\\x22password\\x22:\\x226\\x22,\\x22id\\x22:\\x22e2cad174-736e-3041-cf7e\\x22, \\x22FName\\x22:\\x22HS\\x22}", "request_method":…
Vor
  • 33,215
  • 43
  • 135
  • 193
2
votes
1 answer

SQLAlchemy - AttributeError: 'Table' object has no attribute replace

I am trying to extract schema from a table in one database and transfer it to another database. The following is a portion of the function which performs this operation. It errors out when Table( ... ) is called. Function Sample: def…
iamgollum613
  • 101
  • 1
  • 1
  • 8
2
votes
2 answers

Output backspace character in UNIX

I am trying to animate a loading bar. It works completely fine in Windows by doing the following: for(int j=0; j(219); for(int k=maxSize; k>=currentSize; k--) …
Steven Morad
  • 2,511
  • 3
  • 19
  • 25
2
votes
2 answers

Does python re (regex) have an alternative to \u unicode escape sequences?

Python treats \uxxxx as a unicode character escape inside a string literal (e.g. u"\u2014" gets interpreted as Unicode character U+2014). But I just discovered (Python 2.7) that standard regex module doesn't treat \uxxxx as a unicode character.…
Chris
  • 9,986
  • 8
  • 48
  • 56
2
votes
2 answers

PHP PCRE unicode escape

I am working with a regexp database that contains expressions with "\uXXXX", which, of course, breaks PHP PCRE. So, two part question, is there a way to tell PCRE to accept those sequences? And I got around the issue, luckily it was only the one…
Wayne Weibel
  • 933
  • 1
  • 14
  • 22
2
votes
1 answer

How to convert literal \u sequences into UTF-8?

I am loading data dump from external source and some strings contain \uXXXX sequences for the UTF8 chars, like this one: \u017D\u010F\u00E1r nad S\u00E1zavou I can check the contents by using E'' constant in psql, but cannot find any…
vyegorov
  • 21,787
  • 7
  • 59
  • 73
1
vote
1 answer

Trying to run a chess.pl engine in Sicstus prolog

I'm trying to run a chess.pl engine in SICStus prolog but I'm getting this error: Which command should I execute to run that page code ? I've tried several options none of which works. (Perhaps compile chess.pl in the last but one line in the…
1
vote
1 answer

In python, how do you get the escape sequence for any Unicode character?

In python, what is the escape sequence for the left-double quote Unicode character “ (U+201C)? left_double_quote = "“" print(ord(left_double_quote)) # prints `8220` Note that 201C is hexadecimal notation for the decimal number 8220 I tried…
Toothpick Anemone
  • 4,290
  • 2
  • 20
  • 42
1
vote
1 answer

HTML Special Character Codes translation in text XSLT 2.0

I receive text from source system with HTML special escape characters in middle of text. Now I need to translate it to the actual character in XSLT 2.0 I/p like Lenevo100 für Laser DELL Àllow…
1
vote
1 answer

How to convert utf8 string to escape string in JSON Java?

I want to convert a UTF-8 string to escape \uXXX format in value of JSON Object. I used both JSON Object and Gson, but did not work for me in this case: JSONObject js = new…
Nguyen
  • 33
  • 5
1
vote
3 answers

Javascript regex validation for non latin characters with few few symbols whitelist

I'm trying to create a validation rules for username in two steps: Detect if strings contains any non latin characters. All non albhabetic symbols/numbers/whitespaces are allowed. Detect if string contains any symbols which are not in the whitelist…
M.N.
  • 65
  • 8
1
vote
1 answer

How to use Perl pack to convert UTF-16 surrogate pairs to UTF-8?

I have input strings which contain text in which some characters are in UTF-16 format and escaped with '\u'. I am trying to, in Perl, convert all the strings to UTF-8. For example, the string 'Alice & Bob & Carol' might be formatted in the input…
1
vote
1 answer

Simulate 'backspace' in Jquery

I have a simple animation code, looks like a console input. Originally from: https://codepen.io/atunnecliffe/pen/BaZyLR I modified the splash screen intro into just a console input in my website: Code: