I’m working on a testing framework which prints to the command-line and instead of ‘Pass’/’Fail’, I would like to print ticks (check mark) for pass and crosses for fail. I found the symbols at the bottom of this wingdings character set, and I’ve seen these exact ones used before in Mocha (a javascript unit test framework)
Can I print them from C using a simple printf? Examples would be smashing, thanks!
p.s: I’m using *nix
This depends on your platform, and whether the terminal (the program that receives the
printf()output and renders it as readable text) is Unicode-aware.If it’s running e.g. UTF-8, you can print the character’s UTF-8 sequence: