Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

211
Visualizações
Printing a sharp sign character

I am trying to print this Unicode character(and many others) but the Console displays a ?. It should print the sharp sign https://unicode-table.com/en/266F/ Could you please help me? "kjfnv" is in UTF-16BE, I have tried it in UTF-16LE too (6F 26), but it does not work

char kjfnv = '\u6F26';
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I am trying to print this Unicode character(and many others) but the Console displays a '?'.

The problem is not with the character, but it's the console not being configured the correct font to display this character.

You can manually set a console's Font, here's a tutorial on how to do it. I don't know of a way to set it programmatically (yet).

https://www.tenforums.com/tutorials/93961-change-console-window-font-font-size-windows.html

Here's a .net Fiddle: https://dotnetfiddle.net/xLvRq2

using System;
                    
public class Program
{
    public static void Main()
    {
        char kjfnv = '\u266F';
        Console.WriteLine(kjfnv);
    }
}

Output:

♯

Update:

my personal set of applicable fonts in the console is very limited - meaning: I am not able to display the character.

However, the .net fiddle proves the methodology is correct - meaning: changing your console host, or find a way to make use of the correct font in Console should do the trick.

Here's a article on how to change fonts in powershell. Possibly a similar thing exists for the default console host: https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/adding-more-fonts-to-powershell-console


@EricMovsessian: wasn't able to get this working without seriously needing to change some default values. For me this is not worth further investigation.

Keep in mind Console graphic capabilities are very limited, perhaps you want to consider an alternative technique, or just use the number sign # as a substitute

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda