44 lines
1.0 KiB
Diff
44 lines
1.0 KiB
Diff
|
--- pith/string.c
|
||
|
+++ pith/string.c
|
||
|
@@ -769,6 +769,7 @@
|
||
|
return("xxx");
|
||
|
else{
|
||
|
static char buf[20];
|
||
|
+ char *utf8buf;
|
||
|
struct tm tm;
|
||
|
|
||
|
memset(&tm, 0, sizeof(tm));
|
||
|
@@ -810,6 +811,12 @@
|
||
|
|
||
|
buf[0] = ' ';
|
||
|
}
|
||
|
+ utf8buf = convert_to_utf8(buf, NULL, 0);
|
||
|
+ if (utf8buf != NULL) {
|
||
|
+ strncpy(buf, utf8buf, sizeof(buf));
|
||
|
+ buf[sizeof(buf)-1] = '\0';
|
||
|
+ fs_give((void **)&utf8buf);
|
||
|
+ }
|
||
|
|
||
|
return(buf);
|
||
|
}
|
||
|
@@ -841,12 +848,19 @@
|
||
|
return("");
|
||
|
else{
|
||
|
static char buf[20];
|
||
|
+ char *utf8buf;
|
||
|
struct tm tm;
|
||
|
|
||
|
memset(&tm, 0, sizeof(tm));
|
||
|
tm.tm_year = 107;
|
||
|
tm.tm_mon = month_num-1;
|
||
|
our_strftime(buf, sizeof(buf), "%B", &tm);
|
||
|
+ utf8buf = convert_to_utf8(buf, NULL, 0);
|
||
|
+ if (utf8buf != NULL) {
|
||
|
+ strncpy(buf, utf8buf, sizeof(buf));
|
||
|
+ buf[sizeof(buf)-1] = '\0';
|
||
|
+ fs_give((void **)&utf8buf);
|
||
|
+ }
|
||
|
return(buf);
|
||
|
}
|
||
|
}
|