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
0
votes
2 answers

String doesn't contain entity, but shows it, and representation doesn't change upon replacement

So I think the image below shows my problem pretty well: I would be expecting the original string to be printed as-is, since when I send it in a response (using JAX-RS) it actually shows the \u2018, not the left quote it should. However, applying…
0
votes
1 answer

JSON containing a regular expression in Objective C

Here is a field value returned by web service in JSON ^\+?\d+(-\d+)*$ but when i get it, it becomes ^+?d+(-d+)*$. But i need the original one from JSON. How to get the same from objective C. For example : If i use NSString…
Tunvir Rahman Tusher
  • 6,421
  • 2
  • 37
  • 32
0
votes
0 answers

Are there any online sites that can translate an escape sequence?

I'm messing with a new project, one that uses the strace program on Linux. I ran this command: strace -e'read,write' -o /tmp/myprogram.log top just to get a gist of what strace outputs, and I have no clue what half of the output means. Here's an…
RPiAwesomeness
  • 5,009
  • 10
  • 34
  • 52
0
votes
0 answers

Escape String in Grails to avoid JSON error

I have few strings like "12.10 On-Going Submission of ""Made Up"" Samples." 10. PRODUCT STANDARDS; APPROVAL. which I render as JSON in grails. The quotes and any other possible special characters are giving me trouble i.e they make the JSON…
krs8785
  • 1,097
  • 2
  • 14
  • 24
0
votes
3 answers

StringEscapeUtils.escapeJava

I am getting \u1F44A\u1F44A where i am expecting \ud83d\udc4d\ud83d\udc4d. import org.apache.commons.lang3.StringEscapeUtils val…
Govind Singh
  • 15,282
  • 14
  • 72
  • 106
0
votes
1 answer

Querying with Unicode in Freebase MQL Query Editor

Suppose I make the following query in freebase, [{ "mid": "/m/02y7vp", "name": null }] The answer that I get back is, { "result": [{ "name": "G\u00fcnter Verheugen", "mid": "/m/02y7vp" }] } I want to construct…
shyamupa
  • 1,528
  • 4
  • 16
  • 24
0
votes
0 answers

Django unicode and characters espace

I'm writing a REST Api using Django and Django REST framework. I have a profile model which countains several attributes and I'm trying to write an update function for the profile. I have problem with two attributes: attribute1 =…
Antoine M.
  • 3,631
  • 3
  • 15
  • 20
0
votes
2 answers

Escaping unicode surrogate characters?

I have the following line of text (see in code as well: TEXT What I'm trying to do do is escape that emoticon (phone icon) as two \u chars then back to its original phone icon? The first method below works fine but I essentially want to escape by a…
genxgeek
  • 13,109
  • 38
  • 135
  • 217
0
votes
1 answer

Need to convert string "Θ" to "\u0398"

My Rails application stores strings containing html entity codes, e.g. "Θ", which display Greeks and other characters on browser pages. To display these same characters in Prawn documents, I need to convert "Θ" to "\u0398". Using a…
drubin
  • 3
  • 3
0
votes
1 answer

sed: matching unicode blocks with

I am desperately trying to replace certain unicode characters (graphemes) from a file using sed. However I keep failing for some of them, namely the ones from unicode blocks: \p{InHigh_Surrogates}: U+D800–U+DB7F \p{InHigh_Private_Use_Surrogates}:…
DrTH
  • 1
  • 3
0
votes
2 answers

Unescape a universal character name to the corresponding character in C

NEW EDIT: Basically I've provided a example that isn't correct. In my real application the string will of course not always be "C:/Users/Familjen-Styren/Documents/V\u00E5gformer/20140104-0002/text.txt". Instead I will have a input window in java and…
Linus
  • 1,516
  • 17
  • 35
0
votes
0 answers

JSON passed through html form input is not decoding

I'd rather not reprocess all of the data twice for my users, so I am trying to send the data as a hidden form input, encoded as JSON, to generate a CSV export in next function:

Marc Maxmeister
  • 4,191
  • 4
  • 40
  • 54

0
votes
2 answers

Erasing all unreadable characters in tab-delimited txt

I am running a python program to process a tab-delimited txt data. But it causes trouble because it often has unicodes such as U+001A or those in http://en.wikipedia.org/wiki/Newline#Unicode (Worse, these characters are not even seen unless the txt…
0
votes
2 answers

Convert escaped unicode string to bytearray

My input string consists of a mixture of unicode escape characters with regular characters mixed in. Example: String input…
RaGe
  • 22,696
  • 11
  • 72
  • 104
0
votes
0 answers

Printing escape sequences in java String

Possible Duplicate: How do I print escape characters in Java I am writing a program which reads a String from a file and generates tokens from that file. Eg. if the file is '1\t .\n$$$' then the java String I want is exactly same. So String…
Deepti Jain
  • 1,901
  • 4
  • 21
  • 29