unicode

How to combine two code points to get one?

How to combine two code points to get one? Question: I know that unicode code point for Á is U+00C1. I read on internet and many forums and articles that I can also make an Á by combining characters ´ (unicode: U+00B4) and A (unicode: U+0041). My question is simple. How to do it? I …

Total answers: 2

How to render math symbols as text in SVG/EPS/PDF images?

How to render math symbols as text in SVG/EPS/PDF images? Question: When creating graphs using, for instance, Python. It is possible to save these figures as vector graphics (SVG, EPS, PDF) and the text is rendered separately. This makes it possible to select or search the text when shown in a pdf file. However, I’ve …

Total answers: 2

Displaying Special Characters Using Unicode

Displaying Special Characters Using Unicode Question: I want to know how to type a special character "Cherry" like the fruit. I got the Unicode string and attempted to display it, but for some reason it sees the 2 within u1F352 as part of the string and not the Unicode sequence, so it displays something completely …

Total answers: 1

Some annoying characters are not normalised by unicodedata

Some annoying characters are not normalised by unicodedata Question: I have a python string that looks like as shown below. This string is from the SEC filing of one public company in the US. I am trying to remove some annoying characters from the string using unicodedata.normalise function, but this is not removing all characters. …

Total answers: 2

Python – Issues with Unicode String from API Call

Python – Issues with Unicode String from API Call Question: I’m using Python to call an API that returns the last name of some soccer players. One of the players has a "ć" in his name. When I call the endpoint, the name prints out with the unicode attached to it: >>> last_name = (json.dumps(response["response"][2]["player"]["lastname"])) …

Total answers: 2

Python- problem converting negative numbers to floats, issues with hyphen encoding

Python- problem converting negative numbers to floats, issues with hyphen encoding Question: I have a Pandas dataframe that I’ve read from a file – pd.read_csv() – and I’m having trouble converting a column with string values to float. Firstly, I’m not entirely sure why pandas is even reading the column as string files to begin …

Total answers: 1

Python re matching fails to work for extened unicode range

Python re matching fails to work for extened unicode range Question: import re pat = re.compile(r"[u20000-u2A6D6]+") pat.match("Hello World!") This will give us a result <re.Match object; span=(0, 5), match=’Hello’> But in fact, the input string here is fully ASCII which is not from the unicode range. Is this expected? If so, how to compile those …

Total answers: 1

Unicode emoji as string to emoji in Python3

Unicode emoji as string to emoji in Python3 Question: I’m reading a file with a lot of Unicode code (emojis) such as U+1F49B. What I want to do is do something like "U0001F49B", but without writing, I just have the code like this in a variable "U0001FA77" class Emoji: def __init__(self, tipo, codigo): self.tipo = …

Total answers: 1

translating Unicode characters from input

translating Unicode characters from input Question: I have a string with unicode characters that I need to decode. When I hardcode the string into python it seems to work. However, if I get it through an input, it doesn’t translate. For example, input_0 = input() #fu00eate print(input_0) # prints fu00eate word = "fu00eate" print(word) # …

Total answers: 1