13:33 < heinrich5991> "unicode" strings? 13:33 < heinrich5991> utf8? utf16? 14:09 <@minus> utf-8 14:27 < rand> i though json text was supposed to be encoded in utf8 (by default) 14:41 <@minus> but there are those silly escape sequences 14:42 < rand> how do you handle utf8 string in C ? 14:43 < rand> in json, for a non ascii character, its '\u' followed by utf8_code 14:43 < rand> in hex 14:46 < rand> so if utf8 string are integer array, it looks like printf("\\u%04x", utf8_char) 14:47 <@minus> though utf8 can be more than 16bits, right? 14:50 < rand> yes, until 32bits 14:52 < rand> hm, im not really sure about my simple printf 14:55 < rand> after one test, it seems ok :D 15:06 < rand> > http://ix.io/knr/c 15:07 < heinrich5991> rand: is wchar_t encoded as utf8? 15:07 < heinrich5991> or utf16? or utf32? 15:10 < heinrich5991> rand: you probably have to re-encode utf8 sequences that take more than two uint16s for this 15:17 < rand> right 15:17 <@minus> does it make sense to do everything as char (or byte if you so want) in your program, utf-8 encoded, and let the text renderer take care of the rest? 15:19 < rand> as soon as the program don't know what is in its char, it's okay, i guess ^^ 15:20 < rand> i mean, if the program don't process char arrays as character but as raw data 15:21 < rand> i think chat messages in tw are handle that way 15:22 < heinrich5991> minus: yes, that makes sense IMO, and it's mostly* how teeworlds treats strings, as opaque byte arrays 15:22 < heinrich5991> *mostly, beecause it doesn't really at a few places 15:25 <@minus> also, char is a silly data type name for what it's used 15:25 < heinrich5991> but char in c is byte 15:25 < heinrich5991> -but 15:25 < heinrich5991> char in rust is codepoint 15:25 < heinrich5991> both not named too well 15:26 < rand> byte arrays are great :D 15:26 < heinrich5991> (although char was right at the time C was developed, so...)