0

I'm playing with \N{name} (character named name in the Unicode database) but it doesn't work.

Typing this code:

print "\N{GREEK CAPITAL LETTER DELTA}"

or this variant:

print u"\N{GREEK CAPITAL LETTER DELTA}"

I get the result:

\N{GREEK CAPITAL LETTER DELTA}

in both cases.

What is the problem? Why didn't I get a character from the Unicode database?

Nikita Shub
  • 109
  • 2
  • 8

1 Answers1

2

\N is the proper escape sequence. You have to use a backslash \.

Also see : UnicodeEncodeError: 'charmap' codec can't encode character '\u2010': character maps to <undefined>

Community
  • 1
  • 1
Raphaël Gomès
  • 938
  • 1
  • 8
  • 23