Commit e139cad3 authored by rene's avatar rene
Browse files

multimedia/w_scan2: update to 1.0.11

- Implemented XML export of transponder and channel list
- our patch to work around not having ISO-6397-2 upstreamed

Reported by:	portscout
parent 13d86eaa
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= w_scan2 PORTNAME= w_scan2
PORTVERSION= 1.0.10 PORTVERSION= 1.0.11
CATEGORIES= multimedia CATEGORIES= multimedia
MAINTAINER= rene@FreeBSD.org MAINTAINER= rene@FreeBSD.org
......
TIMESTAMP = 1615063849 TIMESTAMP = 1615721275
SHA256 (stefantalpalaru-w_scan2-1.0.10_GH0.tar.gz) = 7b0ebe2a6dd8ffa9ebf8411f016fafec49dd7c86fe88684d452907e22e9d4b76 SHA256 (stefantalpalaru-w_scan2-1.0.11_GH0.tar.gz) = 7b8afbd0885f0fa7b6d789660eabfdac2d0462fe5b24021f3a3066585d53b6d0
SIZE (stefantalpalaru-w_scan2-1.0.10_GH0.tar.gz) = 200582 SIZE (stefantalpalaru-w_scan2-1.0.11_GH0.tar.gz) = 202634
--- src/char-coding.c.orig 2020-08-22 13:49:25 UTC
+++ src/char-coding.c
@@ -340,14 +340,31 @@ void char_coding(char **inbuf, size_t * inbytesleft, c
// Fallback method: copy all printable chars from *inbuf to *outbuf.
size_t i;
size_t pos = 0;
-
+#ifdef __FreeBSD__
+ int to_utf = user_charset_id < iconv_codes_count() &&
+ !strncmp(iconv_codes[user_charset_id], "UTF", sizeof "UTF" - 1);
+#endif
for (i = 0; i < nsrc; i++) {
switch ((uint8_t) * (psrc + i)) {
//case 0x20 ... 0x7E:
//case 0xA0 ... 0xFF:
// printable chars ISO-6937-2
// Figure A.1: Character code table 00 - Latin alphabet
+#ifdef __FreeBSD__
+ case 0x80 ... 0xFF:
+ // the iconv used on FreeBSD doesn't know about the
+ // default DVB charset ISO-6397-2 so we'll end up here
+ // for 8-bit chars in channel names that are (usually
+ // wrongly) specified as the default charset - and if
+ // we are converting to UTF those will create invalid
+ // encodings.
+ if (to_utf)
+ continue;
+ // FALLTHRU
+ case 0x01 ... 0x7F:
+#else
case 0x01 ... 0xFF: // 20121202: don't touch anything; leave it as it is.
+#endif
*(pdest + pos++) = *(psrc + i);
default:;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment