From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3459 Path: news.gmane.org!not-for-mail From: orc Newsgroups: gmane.linux.lib.musl.general Subject: Iconv and old codepages Date: Thu, 27 Jun 2013 02:15:39 +0800 Message-ID: <20130627021539.76b69eea@sibserver.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/k=3prYTVfPvQzT15ML4ubnl" X-Trace: ger.gmane.org 1372270169 19324 80.91.229.3 (26 Jun 2013 18:09:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Jun 2013 18:09:29 +0000 (UTC) To: musl list Original-X-From: musl-return-3463-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jun 26 20:09:30 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Uru9n-0004BJ-F4 for gllmg-musl@plane.gmane.org; Wed, 26 Jun 2013 20:09:27 +0200 Original-Received: (qmail 9260 invoked by uid 550); 26 Jun 2013 18:09:26 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9251 invoked from network); 26 Jun 2013 18:09:26 -0000 X-Mailer: claws-mail Xref: news.gmane.org gmane.linux.lib.musl.general:3459 Archived-At: --MP_/k=3prYTVfPvQzT15ML4ubnl Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, How many codepages does in-musl iconv supports? Currently I'm trying converting from "utf8" to "cp1251" and iconv() only gives me a number of "*"'s matching the utf8 input. Is this correct behavior and iconv() currently does not support non-UTF legacy codepages? Even so, I still see many of them in src/locale/codepages.h The (dirty) test program attached. I also noticed alternative libs thread and corresponding wiki page. Does someone know lightweight iconv replacement as a temporary measure (other than libiconv for example)? Regards. --MP_/k=3prYTVfPvQzT15ML4ubnl Content-Type: application/octet-stream; name=ticonv.c Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=ticonv.c I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxpY29udi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+ CgppbnQgbWFpbih2b2lkKQp7CgljaGFyIGNbXSA9ICJceGQxXHg4Mlx4ZDBceGI1XHhkMVx4ODFc eGQxXHg4MiIsICp0YyA9IGM7CgljaGFyIHRvWzUxMl0gPSB7MH0sICpvdXQgPSB0bzsKCXNpemVf dCBmLCB0OwoJaWNvbnZfdCBjZDsKCQoJY2QgPSBpY29udl9vcGVuKCJjcDEyNTEiLCAidXRmOCIp OwoJaWYgKGNkID09IChpY29udl90KSgtMSkpIHJldHVybiAxOwoJZiA9IHN0cmxlbihjKTsKCXQg PSBzaXplb2YodG8pOwoJaWNvbnYoY2QsICZ0YywgJmYsICZvdXQsICZ0KTsKCXByaW50ZigiJXNc biIsIHRvKTsKCglpY29udl9jbG9zZShjZCk7CgoJcmV0dXJuIDA7Cn0K --MP_/k=3prYTVfPvQzT15ML4ubnl--