utf 8 - How to convert a number to a UTF8 char? -


How to change a number in a UTF 8 character?

This should not be a CTEF function because the input parameters are different during run-time, I think there should be an STD function for this, but I can not find it. import std.stdio, std.conv; Four utf8_RT (Int NBR) {Return! Four (nbr); } Zero main (string AGR []) {emphasis (UTF 8_RT (2665) == '\ u2665'); }

clearly fails.

I do not know if you mean "UTF8 char".

If you want a UTF-32 character (i.e. dchar ), then you can just use dchar (2665) .

If you want the UTF-8 string (a Unicode character one or more UTF-8 code units, i.e. encoded as bytes), then you ! String (dchar (2665)) can be used. . Do not forget to import std.conv

Change 2665 by the name of your int variable, naturally

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -