($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
To: ofono@lists.linux.dev
Cc: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Subject: [PATCH] gisi: switch to musl-safe character conversion
Date: Sat,  4 Nov 2023 10:53:05 +0200	[thread overview]
Message-ID: <20231104085306.2834870-1-absicsz@gmail.com> (raw)

Support isimodem (gisi) use on musl libc systems by dropping the use
of the iconv TRANSLIT extension when converting from UCS2 to UTF-8 [1]

[1] https://wiki.musl-libc.org/functional-differences-from-glibc.html#iconv
---
 gisi/iter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gisi/iter.c b/gisi/iter.c
index 3cc1ae37..74f1c44f 100644
--- a/gisi/iter.c
+++ b/gisi/iter.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <glib.h>
 #include <arpa/inet.h>
+#include <ell/ell.h>
 
 #include "iter.h"
 
@@ -257,8 +258,7 @@ gboolean g_isi_sb_iter_get_alpha_tag(const GIsiSubBlockIter *restrict iter,
 	if (ucs2 + len > iter->end)
 		return FALSE;
 
-	*utf8 = g_convert((const char *) ucs2, len, "UTF-8//TRANSLIT",
-				"UCS-2BE", NULL, NULL, NULL);
+	*utf8 = l_utf8_from_ucs2be((const char *) ucs2, len);
 	return *utf8 != NULL;
 }
 
-- 
2.42.0


             reply	other threads:[~2023-11-04  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-04  8:53 Sicelo A. Mhlongo [this message]
2023-11-06  2:32 ` [PATCH] gisi: switch to musl-safe character conversion Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231104085306.2834870-1-absicsz@gmail.com \
    --to=absicsz@gmail.com \
    --cc=ofono@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).