Topic: Unicode?
How do you use unicode chars in teeworlds? I can use them here (°?) but not in teeworlds (at least not with the same method).
deny_post($poster);
You are not logged in. Please login or register.
Teeworlds Forum → Support → Unicode?
How do you use unicode chars in teeworlds? I can use them here (°?) but not in teeworlds (at least not with the same method).
teeworlds doesnt have support for all chars as it uses bitmap fonts (I think)(wtf btw), style your nick with the ones that exist instead
Ok, thanks.
also the c and c++ code only uses char and not any functions that provide utf-8. it's all iso-8859-1. if you want to convert this iso to utf-8 but in a char array you can use something like this:
int i;
int n = 0;
for(i=0; querybuffer[i] != 0;i++)
{
if(querybuffer[i] > 0)
{
querybuffer_conversion[n++] = querybuffer[i];
}
else
{
querybuffer_conversion[n++] = (3<<6) | ((querybuffer[i] & (3 << 6)) >> 6);
querybuffer_conversion[n++] = (querybuffer[i] & 63) | (1<<7);
}
}
querybuffer_conversion[n] = 0;
querybuffer is the array in iso-8859-1. querybuffer_conversion should be 2*length of querybuffer to avoid segmentation faults. in querybuffer_conversion could appear some chars with binary code 110* at the beginning, so you have to use functions that detect those chars which are 2 byte long.
i hope that helps you at whatever you want to do there
Teeworlds Forum → Support → Unicode?
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.