User forums > Help
utf-8 not working????
nykS:
Hello, folks!
I have a problem with the Codeblocks. When I want to write the "Δ" it shows me a square.
Image
oBFusCATed:
Have you checked the Editor settings? I don't think we enable UTF-8 by default on Windows, I guess we use your systems default.
What is the selected encoding for the file you're editing (edit->file encoding)?
BlueHazzard:
Does the used font supports this symbol?
nykS:
--- Quote from: oBFusCATed on November 19, 2018, 10:40:01 am ---Have you checked the Editor settings? I don't think we enable UTF-8 by default on Windows, I guess we use your systems default.
What is the selected encoding for the file you're editing (edit->file encoding)?
--- End quote ---
Is selected UTF-8.
--- Quote from: BlueHazzard on November 19, 2018, 10:28:15 pm ---Does the used font supports this symbol?
--- End quote ---
You right! Thank you!
But when I compile it shows me "╬ö" instead of "Δ", why?
oBFusCATed:
--- Quote from: nykS on November 20, 2018, 04:21:04 pm ---But when I compile it shows me "╬ö" instead of "Δ", why?
--- End quote ---
Where does it show it? Do you use the same font in the two places? Have you told the compiler that your source files are in a specific encoding. If you want to enter specific characters it is probably most reliable if you enter unicode values directly using \x, \u, \U or something similar.
https://stackoverflow.com/questions/6796157/unicode-encoding-for-string-literals-in-c11
I'm not expert, you'll have to search for more information how to solve your problem...
Navigation
[0] Message Index
[#] Next page
Go to full version