7 * go from http with latin1 escapes to utf,
8 * we assume that anything >= Runeself is already in utf
11 httpunesc(HConnect *cc, char *s)
17 v = halloc(cc, UTFmax*strlen(s) + 1);
20 if(s[1] == '#' && s[2] && s[3] && s[4] && s[5] == ';'){
21 c = strtol(s+2, 0, 10);
27 if(c < 256 && c >= 161){
29 t += runetochar(t, &e->value);
34 for(e = htmlesc; e->name != nil; e++)
35 if(strncmp(e->name, s, strlen(e->name)) == 0)
38 t += runetochar(t, &e->value);