{
while (srclen>0 && (*dstlen)>0){
uint16_t uc = *src<<8|*(src+1);
- int len = encode_utf8(uc, dst, *dstlen);
- if (len == -1) {
- errno = E2BIG;
- return -1;
+ if (uc >= 0xe080 && uc <= 0xe09f) {
+ // codes 0xe080 - 0xe09f (control codes) are ignored except CR/LF
+ if (uc == 0xe08a) {
+ *dst = '\n';
+ (*dstlen)--;
+ }
} else {
- (*dstlen) -= len;
- dst += len;
+ int len = encode_utf8(uc, dst, *dstlen);
+ if (len == -1) {
+ errno = E2BIG;
+ return -1;
+ } else {
+ (*dstlen) -= len;
+ dst += len;
+ }
}
srclen-=2;
src+=2;
(*dstlen)--;
dst++;
} else if (c <= 0x9f) {
- // codes 0x80 - 0x9f (control codes) are ignored
+ // codes 0x80 - 0x9f (control codes) are ignored except CR/LF
+ if (c == 0x8a) {
+ *dst = '\n';
+ (*dstlen)--;
+ }
} else {
// map according to character table, skipping
// unmapped chars (value 0 in the table)
(*dstlen)--;
dst++;
} else if (c <= 0x9f) {
- // codes 0x80 - 0x9f (control codes) are ignored
+ // codes 0x80 - 0x9f (control codes) are ignored except CR/LF
+ if (c == 0x8a) {
+ *dst = '\n';
+ (*dstlen)--;
+ }
} else {
uint16_t uc;
if (c >= 0xc0 && c <= 0xcf) {
font-weight: bold;
text-align: center;
border-bottom: 1px solid #000000;
+ white-space: pre-wrap;
}
.x-epg-subtitle {
margin: 5px;
font: normal 12px arial, tahoma, helvetica, sans-serif;
font-weight: bold;
+ white-space: pre-wrap;
}
.x-epg-prefix {
.x-epg-summary {
margin: 5px;
font-weight: bold;
+ white-space: pre-wrap;
}
.x-epg-desc {
margin: 10px;
+ white-space: pre-wrap;
}
.x-epg-left {