Title: How to display a spacial code (e.g., triangular bullet: \u2023) n times with c# Console.WriteLine()
Tags: c#;unicode;console
Question: How can I display spacial codes in c# ```Console.WriteLine()```?

Given:  ```symbol = '\u2023';```
The escape sequence ```\u2023``` should display ```‣``` on console in c#. So, How can I get output for the symbol as ```'‣'``` and not ```'?'``` 

What I get is just a wrong symbole ```'?'``` instead.



```public void DisplayPattern (int n, char symbol)
{
    string pattern = "";
    for (int i = 0; i < num; i++)
    {
        pattern = new String(symbol, i);                  
        Console.WriteLine(pattern);
    }
}
```



Comment: Console can only show ASCII characters.

Comment: it should be possible by using:         // The encoding: 
        UnicodeEncoding unicode = new UnicodeEncoding(); but I dont know how to develop my function to get the output right!

Comment: Thanks for the suggestion. However, I used this method but the question marks turned in to squares not triangle!

Comment: Yes, It works. thank you very much, indeed!

Comment: Does this answer your question? [How to write Unicode characters to the console?](https://stackoverflow.com/questions/5750203/how-to-write-unicode-characters-to-the-console)

Comment: @AliSafari change the font. MS Gothic shows the triangle for me.

Here is the accepted answer: Set the console encoding

```Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.Write('\u2023');
```

now it depends if you use a font that supports that character. ```Consolas``` doesn't.

Comment for this answer: Do you know how can I change my console font?
Comment for this answer: Sorry @fubo, where I have to do the right click? If you mean on cmd.exe? then I don't see any font tab on this app.
Comment for this answer: @AliSafari the link to the duplicate question I posted shows you how to change the font
Comment for this answer: @AliSafari right, change the font of your console like Crowcoder mentioned. (right click on console bar, properties, font, Gothic)

Here is another answer: So with help of you guys I write the answer down:
As @fubo said: 
first add: 

```Console.OutputEncoding = System.Text.Encoding.UTF8;
```

then choose an appropriate font like what @Crowcoder said: MS Gothic will turn all the question marks into triangle bullets.




{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 6, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2019:00:12/17/19', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<c#><unicode><console>', 'Title': 'How to display a spacial code (e.g., triangular bullet: \\u2023) n times with c# Console.WriteLine()', 'ViewCount': 134, 'id': 59375183, 'user_AboutMe': '<p><strong>Scientific App Developer</strong></p>\n<p>► Mainly <code>React, TypeScript, DotNet, C#, MongoDB, ...</code></p>\n<p>Studied at:\n• Thomas More Applied University, Belgium\n• Vrije Universiteit Brussel (VUB), Belgium</p>\n', 'user_AccountId': 14821470.0, 'user_DisplayName': 'Ali Safari', 'user_Reputation': 1198.0, 'user_Views': 75.0, 'user_id': 10703628.0}}