more attempts at utf8 mapping
This commit is contained in:
parent
8e2d47c783
commit
bea2058d72
4
deps/aha/aha.c
vendored
4
deps/aha/aha.c
vendored
@ -337,7 +337,7 @@ char * aha(char *input)
|
||||
append_output(&output, " ", &size, &outat);
|
||||
line=0;
|
||||
momline++;
|
||||
append_output(&output, "<br />", &size, &outat);
|
||||
append_output(&output, "<br />\n", &size, &outat);
|
||||
}
|
||||
else if (c!=8)
|
||||
{
|
||||
@ -359,7 +359,7 @@ char * aha(char *input)
|
||||
case '>': append_output(&output, ">", &size, &outat); break;
|
||||
case '\n':case 13: momline++;
|
||||
line=0;
|
||||
append_output(&output, "<br />", &size, &outat);
|
||||
append_output(&output, "<br />\n", &size, &outat);
|
||||
break;
|
||||
case ' ': append_output(&output, " ", &size, &outat); break;
|
||||
default: {
|
||||
|
@ -2,6 +2,7 @@
|
||||
<HEAD>
|
||||
<TITLE>Magicka BBS</TITLE>
|
||||
<link rel="stylesheet" type="text/css" href="/static/style.css">
|
||||
<meta charset="utf-8">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<div class="header">
|
||||
|
10
www_msgs.c
10
www_msgs.c
@ -471,7 +471,7 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
|
||||
|
||||
|
||||
aha_text = (char *)malloc(jmh.TxtLen + 1);
|
||||
aha_text = (char *)malloc((jmh.TxtLen + 1) * 2);
|
||||
aha_cp437 = (char *)malloc(jmh.TxtLen + 1);
|
||||
|
||||
iconv_cp437 = aha_cp437;
|
||||
@ -481,14 +481,16 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
aha_cp437[jmh.TxtLen] = '\0';
|
||||
|
||||
insz = jmh.TxtLen;
|
||||
outsz = jmh.TxtLen;
|
||||
outsz = jmh.TxtLen * 2;
|
||||
|
||||
ic = iconv_open("UTF-8//TRANSLIT", "CP437");
|
||||
memxet(aha_text, 0, (jmh.TxtLen + 1) * 2);
|
||||
|
||||
ic = iconv_open("UTF-8", "CP437");
|
||||
iconv(ic, &iconv_cp437, &insz, &iconv_text, &outsz);
|
||||
iconv_close(ic);
|
||||
free(aha_cp437);
|
||||
|
||||
aha_text[jmh.TxtLen] = '\0';
|
||||
|
||||
|
||||
aha_out = aha(aha_text);
|
||||
while (len + strlen(aha_out) > max_len - 1) {
|
||||
|
Reference in New Issue
Block a user