Questions tagged [unicode-escapes]
Use this tag for questions related to Unicode Escapes, a Unicode character Escape sequence represents a Unicode character.
303
questions
0
votes
0
answers
19
views
Retrieving unicode character from db in spring
I have a value stored in a db say "test\u03C9test"
my code is along the lines of
var value = <my query> // working fine
try {
test("<root>" + value + "</...
2
votes
1
answer
221
views
Error with Unicode escape character U+001B knitting .rmd to .pdf
When trying to knit my rmd file, I'm getting this error -
! LaTeX Error: Unicode character ^^[ (U+001B)
not set up for use with LaTeX.
Error: LaTeX failed to compile Task1-Final.tex. See
...
-2
votes
1
answer
85
views
Program not running because of "underscore"
I made a program to print an ASCII table up to a certain range (like ASCII from 0 to 104).
#include <stdio.h>
int main(void)
{
int n;
printf("\n\nthis program will print list of ...
0
votes
1
answer
90
views
How does a bullet point become \u2022 in c# for JSON?
This isn't a duplicate of JSON and escaping characters - That doesn't answer this, because those code samples are in JavaScript - I need C#.
What C# method/library converts a bullet point (•) into \...
0
votes
1
answer
57
views
Reading escaped unicode sequence from a text file in Node.JS do not render on console or api response
What I tried
'use strict'
const fs = require('fs')
const app = require('express')();
let data = fs.readFileSync('./unichar.txt')
let str = "\u5973\u88DD\u591Away\u9023\u8EAB\u88D9(\u9577\u8896)&...
1
vote
1
answer
130
views
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 JSONObject();
js.put("...
0
votes
1
answer
91
views
Keeping escaped unicode characters with JSON.stringify of JSON.parse
I have an input JSON like this (which really contains the literal values "\u2013" (the encoded form of a unicode character)):
{"source":"Subject: NEED: 11/5 BNA-MSL \u2013 ...
0
votes
1
answer
23
views
How to ignore a scape of a word character in a python string with two consecutive apostrophe
Escape Issue
Hello all,
I have the bellow python string and I am trying to basically to ignore the '' scape characters. My Goal is to have the two single apostrophe before and after the DD but the raw ...
0
votes
3
answers
108
views
How to incorporate unicode character in a CASE statement in SQL Server?
I have a column of type 'nvarchar' where some of the values have special characters. What I want to do is, if a value starts with a special character, then perform a function to remove that character, ...
0
votes
0
answers
24
views
Python Getting a SyntaxError: parsing command to Hython on windows
I'm trying to parse a few commands to Houdini's Python module called Hython.
And I'm doing this through os on windows.
My command looks like this:
command = '''"c:\\Program Files (x86)\\Steam\\...
10
votes
0
answers
270
views
`\u0027\n\u0027` equals `'\''` in Java?
I was playing around with Java Unicode Escapes and accidentally found the following interesting oddities. Here is the code that I wrote:
static void main(String... args) {
/*
* \u0027 ...
0
votes
0
answers
51
views
Decode double quotes in a json string to convert to json Python
Faced the following problem, I have a following string like this:
mystr = '[\\x22https://dosprn.co.il/\\x22, \\x22DOSPrn - הדפסה בעברית ב-DOS מדפסת Windows DOSPrn. \\\\\\x22Tools\\\\\\x22 Create ...
0
votes
0
answers
24
views
mark part of a plain text
I want to somehow mark a part of a plain text to emphasize that without putting extra characters around that.
I figured out that I can use the combining characters and used \u0332, but when I tried to ...
0
votes
1
answer
71
views
Best way to replace ESC STX SOH characters without changing original data?
I am looking for replacing ESC, STX, SOH with empty space. These characters getting printed alongside original data as shown in the attached image.
0
votes
0
answers
64
views
Create a Python function that allows user to pass in file name exactly as typed
I've seen similar questions to this one but they were older posts so I thought I would ask here again. I'm writing a function where I want a user to be able to pass in a Windows filepath, and for the ...
1
vote
3
answers
344
views
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 ...
-1
votes
1
answer
46
views
What is the JavaScript Escape code for Unicode Carriage Return?
If I ever need to include a newline in a HTML title attribute tooltip, I use the HTML Escape Character for Carriage Return:

Example:
<img src="" title="Line 1
...
-1
votes
2
answers
70
views
Romanian Hex Escape Codes?
I am translating stuff from an application to Romanian (already did German), and I need hex escape codes for ă â ș ț î.
Like the German "ü" is \x81, are there hex escape codes for those ...
3
votes
2
answers
149
views
Visual Studio C++ preprocessor-define fails with path starting on "u"
That's right I want to supply a path as preprocessor define (properties->configuration->c/c++->preprocessor)
MY_PATH=c:\$(WindowsSdkDir)\um
But this hits me upon use with
E1696 cannot open ...
0
votes
1
answer
60
views
I am not able to use Unicode system in my Intellij IDE
Sir I am not able to use Unicode system in my Intellij IDE. I can't use copyright symbol in java 18 JDK. I get the Unicode code point number, \U00A9.
0
votes
1
answer
48
views
include unicode character within long regex
I have a regex:
/[a-zA-Zɑôáīúȑìêɑ͡iɑ͡uŋġḧn̐ƞġg̶̃čḣñt́d́ŕŕńȶv̈m̈ᵯǰɏæǽÿẇẏs̃śś̶]+/gm
which works great except there is one character I can't include (or that doesn't seem to work as expected when ...
2
votes
2
answers
695
views
Parsing JSON with escaped unicode characters displays incorrectly
I have downloaded JSON data from Instagram that I'm parsing in NodeJS and storing in MongoDB. I'm having an issue where escaped unicode characters are not displaying the correct emoji symbols when ...
2
votes
1
answer
236
views
R Package cmd check - unable to identify non-ascii character
I've written a small function that returns the categories of the ICD-10, since I use them frequently. The functions works as expected, however when I want to integrate it into my package it gives me ...
1
vote
1
answer
166
views
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 &...
0
votes
1
answer
68
views
Problem using magenta to generate song: SyntaxError: (unicode error) 'unicodeescape'
I want to generate music with magenta and a neural network model for a project.
I found this simple example and wanted to try it first to understand how it works: https://www.twilio.com/blog/training-...
1
vote
1
answer
77
views
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:
...
0
votes
1
answer
239
views
Save JSON with special characters (currency symbols)
I'm using Scrapy to extract some values from a website. One of the fields is "price" and I have something like:
...
item = {
"title": title,
"url" : url,...
0
votes
1
answer
108
views
Encode invalid/unencoded characters in a JSON
Sometimes I get JSON from a backend that contains unencoded/invalid characters. For example, they might contain an (unencoded) character with ASCII code 31, which means that when I try to do ...
0
votes
5
answers
264
views
How to detect letters and theirs upper/lower case format from two characters which need to be compared to each other?
I need to get:
If either of the characters is not a letter, return -1
If both characters are the same case, return 1
If both characters are letters, but not the same case, return 0
Examples:
'a' and ...
0
votes
0
answers
126
views
How to save ninja build output without loosing the compressed format of output
I tride to duplicate the output of the ninja build system to the separate file but I want to save original campresed look of the ninja output.
If I tee ninja (ninja all | tee -a someFile) I get wall ...
3
votes
2
answers
515
views
Regex to match emojis that can be validly combined with skin tone modifiers?
The JS code to detect emojis (in the usual sense of the term "emoji") is simply:
let str = "...";
if(/\p{Extended_Pictographic}/u.test(str)) {
// do something
}
Is there some ...
0
votes
1
answer
51
views
Is it possible to interpret C-like escape characters stored in postgresql table's column?
Based on https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE , I can do it:
SELECT E'Test:\t\u00e1\u00e4\u00e9' as col;
-- Result (\t is interpreted tab character ...
0
votes
1
answer
6k
views
SyntaxError: (unicode error) `unicodeescape` codec can't decode bytes in position 55-56: truncated \UXXXXXX escape ( CLOSED )
I have this error and i can't fix it. Please help me.! (Image of the error.)
Code:
grb.write('PATHS = {\n')
grb.write(' "Discord" : ROAMING + "\\\Discord",\n')
...
0
votes
1
answer
265
views
Unicode decode mismatch on emojis when using json loads
I have a list of utf-8 encoded objects such as :
test = [b'{"abc\xf0\x9f\x94\xa5\xf0\x9f\x91\xbd\xf0\x9f\xa7\x83": 123}',
b'{"abc\xf0\x9f\xa7\x83": 234}']
and decode it as ...
1
vote
1
answer
614
views
How to handle escape characters in pyspark. Trying to replace escape character with NULL
I'm trying to replace a escape character with NULL in pyspark dataframe. Data in dataframe looks like below
Col1|Col2|Col3
1|\026\026|026|abcd026efg.
Col2 is a garbage data and trying to replace ...
1
vote
1
answer
416
views
Regex to accept only 5 numbers and then a dash or a letter on typescript
I am dealing with an issue with Regex.
I have a input which has maxLength 10.
I achieved till now to have the first given value can be digits for example 12345 but then it waits for a dash and after ...
0
votes
1
answer
406
views
treat "\\n" as escape character in python [duplicate]
how can I print "\n" as a normal newLine "\n"
example:
str = "lorem\\nipsum"
the output should be:
lorem
ipsum
not : lorem\\nipsum
I tried :
print(str[6:])
and more ...
0
votes
1
answer
44
views
After escape string conversion there are some extra characters are showing in javascript
I saw some hex bytes are converting easily to escaped string e.g. 0x54,0x65 etc but when alphabetic strings coming like 0xAA, 0xAF etc, after converting, its adding extra characters. so how can I ...
1
vote
1
answer
3k
views
How do I remove the b'' prefix in a str variable with unicode escapes in python?
I know that using this code can remove the b prefix
>>> b'Hello'
b'Hello'
>>> b'Hello'.decode() # decodes bytes type
'Hello'
But if I use a unicode escape (with unicode_escape codec ...
0
votes
1
answer
81
views
Convert unicode escaped code to unicode char
On my program written in C, I receive a string with Unicode escaped chars. I would like to convert them on unescaped char to print them.
char *string[32];
memset(string, 0, sizeof(string));
strcpy(...
1
vote
2
answers
141
views
How do I include a string in an escape sequence in c#
I have a string which is a combination of variables and text which looks like this:
string str = $"\x0{str2}{str3}";
As you can see I have a string escape sequence of \x, which requires 1-4 ...
0
votes
2
answers
143
views
Removing double whitespace in python when inserting ascii escape characters
How I can remove double whitespace on place where I inserting ascii escape characters. Everything work as I want to but only problem is that double white space in place where I am using escape ...
0
votes
1
answer
415
views
How do I filter out all the undesired names in my array of objects?
I want to exclude out some category names but the if checks in switch and in a traditional if statement aren't working. I also want to translate anything Arabic with English which doesn't seem to be ...
0
votes
1
answer
270
views
How do i use this Escape Hex Character to be implement on StringBuilder ESC X using C#
Hello I'm sending a bunch of strings to a thermal printer i have epson and i'm using stringbuilder for it. so far i manage to do by changing the text to it's normal weight into bold by doing this
...
1
vote
0
answers
429
views
Emoji unicodes aren't displayed correctly in Javascript(vue.js)
I am trying to display emojis inside my Vue.JS app, using this plugin vue-twemoji
HTML
<div id="app">
<input type="text" v-model="text" />
<div v-html=&...
2
votes
0
answers
64
views
Is there any way to write mix directional text with number without any Unicode Directional Formatting code
There is a requirement to write many Arabic words and english words along with numerical digits without using any special character in between. Initially I used U+202C(pop directional formatting code) ...
1
vote
2
answers
348
views
Split a (Bengali) string by a regex without consuming the delimiter, zero-width forward lookahead not working
Actually I can't get it to work in English either. I'm looking for an expression that combines two regexes:
const string = 'Joe shouted, \"The pitchforks are coming!\"';
zeroWidthSplitter = ...
1
vote
1
answer
799
views
jq disable converting to unicode
I have a simple JSON file like:
{
"name": "This is a sample",
"resources": [
{
"id": 0,
"obj": [
...
1
vote
1
answer
153
views
Perl regex substitutions with unicode character don't work, what am I missing?
I'm trying to 'fix' some files that have unexpected unicode characters using perl's regex with the '''\N{UNICODE NAME}''' construct. But for some reason that I don't understand fully, nothing happens,...
2
votes
2
answers
862
views
How to escape unicode special chars in string and write it to UTF encoded file
What I aim to achieve is to:
string like:
Bitte überprüfen Sie, ob die Dokumente erfolgreich in System eingereicht wurden, und löschen Sie dann die tatsächlichen Dokumente.
convert to:
'Bitte \...