Questions tagged [unicode-literals]

Use this tag for questions related to Unicode Literals. An example: ( u'some text' ), which is a different type of an object from a byte string ( 'some text' ).

is used in its general meaning, so make sure you provide a tag of your programming environment, if any, in your question.

For example in Python, quoting this answer:

A unicode literal ( u'some text' ) is a different type of Python object from a python byte string ( 'some text' ). It's like using \n versus \N ; the former has meaning in python literals (it's interpreted as a newline character), the latter just means a backslash and a capital N (two characters).

92 questions
1
vote
2 answers

Unicode string literals in C# vs C++/CLI

C#: char z = '\u201D'; int i = (int)z; C++/CLI: wchar_t z = '\u201D'; int i = (int)z; In C# "i" becomes, just as I expect, 8221 ($201D). In C++/CLI on the other hand, it becomes 65428 ($FF94). Can some kind soul explain this to me? EDIT: Size of…
Dan Byström
  • 9,067
  • 5
  • 38
  • 68
1
vote
2 answers

Can't make unicode string literal with xor symbol in Python?

I'm trying to print the xor symbol in Python (). I can print a universal quantifier just fine: >>> print u"\u2200" ∀ But when I do xor, it prints 8 instead: >>> print u"\u10308" 8 Why?
Dog
  • 7,707
  • 8
  • 40
  • 74
1
vote
1 answer

Java 7 Bug: Displaying Telugu through Unicode literals

While displaying Telugu through unicode in Java 7,java is rendering the blends incorrectly. For example, here is a simple snippet to display a word in HTML. It works great. All the browsers display the text correctly. …
SRKJ
  • 29
  • 5
1
vote
2 answers

unicode string literals using double-quotes

in SQL Server we denote unicode string literals thus: declare @s nvarchar(max) select @s = N'test' however, we can also use double quotes... so we should be able to do this: set quoted_identifier off declare @s nvarchar(max) select @s =…
ekkis
  • 9,804
  • 13
  • 55
  • 105
0
votes
0 answers

how to identify accent characters in string - Apex Salesforce?

we are creating flat file in which placeholders are very important so if consider given name has accented character in it like ÀÂÄÇÉÈÊËÎÏÛÜÔÖàâäeéèêëîïjôöùûü I need to fix the padding. So my question is how I can identify these characters in a…
0
votes
0 answers

PowerShell Not Finding a Replacing Section Character

I created a list and then read in data from a database table. [System.Collections.ArrayList]$RawNotes = @() I read in the data to the list: foreach ($TmpRow in $Datatable) { $RawNotes.Add($TmpRow.Notes) | Out-Null } When I try to find the…
0
votes
1 answer

Unicode symbol not rendering in Push Notification

I have a number of string literals in my C# that include unicode characters. We are using these to send Push Notifications via Azure Notifcations Hub. When I send one of the strings in this first set below the notification renders with the expected…
0
votes
1 answer

How to get gcc to compile 16-bit unicode strings

So I'm trying to compile this project : https://github.com/dmitrystu/libusb_stm32 with Segger Embedded studio which uses gcc. The process is choking on this error : pasting formed 'u"Open source USB stack for STM32"', an invalid preprocessing…
0
votes
0 answers

How to write a portable c++ code with unicode support?

I have the below program, which tries to print Unicode characters on a console by enabling the _O_U16TEXT mode for the console: #include #include #include int main() { _setmode(_fileno(stdout), _O_U16TEXT); …
Test
  • 564
  • 3
  • 12
0
votes
0 answers

Black square character improperly shown when rapidly printed

so i made this on repl.it : #include #include #include using namespace std; int main(){ for(int i=0; i<100; i++){ for(int j=0; j<30; j++){ for(int k=0; k<40; k++){ cout<<"■"<<' '; …
oilpeanut
  • 1
  • 1
  • 1
0
votes
0 answers

MatplotLib: Scatter of Unicode characters with URL links

I want to export a matplotlib scatter plot as a SVG with a different hyperlink from each scatter points which are not simple markers but Unicode characters. I've try the following: import matplotlib.cm as cm import matplotlib as mpl import…
pierebean
  • 1
  • 3
0
votes
0 answers

How to use the sv operator together with the _T macro in Visual C/C++?

I want to define a string_view literal using the sv operator, but since my application can be compiled as either ANSI or UNICODE I use Microsoft's _T macro from tchar.h. Since I want to apply the sv operator on a wchar_t pointer/string I assumed I…
Patrick
  • 23,217
  • 12
  • 67
  • 130
0
votes
1 answer

String unicode with functions

I am trying to archive that a function is returning a unicode string and I want to log it into the console. But it just either displays the information about the function or just not a unicode string. let test = () =>…
0
votes
0 answers

Possible mixed-encoding string: how to find the missing character?

I have a PDF document that is mostly Farsi, but also includes some Latin characters with diacritics above or below from the DMG's DIN 31635 standard for the transliteration of the Arabic alphabet. The PDF mostly displays both, the LTR- as well as…
0
votes
2 answers

Get the Unicode from a Hexadecimal

I've been searching for a solution to my problem for days but can't get a spot-on answer when looking at previously answered questions/ blogs / tutorials etc. all over the internet. My aim is to write a program which takes a decimal number as an…
moeux
  • 191
  • 15