From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 21 17:40:03 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C9911065679 for ; Thu, 21 May 2009 17:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E6DB88FC25 for ; Thu, 21 May 2009 17:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4LHe2IC094026 for ; Thu, 21 May 2009 17:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4LHe2BF094025; Thu, 21 May 2009 17:40:02 GMT (envelope-from gnats) Resent-Date: Thu, 21 May 2009 17:40:02 GMT Resent-Message-Id: <200905211740.n4LHe2BF094025@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vyacheslav Anikin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32AED1065672 for ; Thu, 21 May 2009 17:30:09 +0000 (UTC) (envelope-from anikinsl@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id B40978FC13 for ; Thu, 21 May 2009 17:30:08 +0000 (UTC) (envelope-from anikinsl@gmail.com) Received: by fg-out-1718.google.com with SMTP id e12so1227428fga.12 for ; Thu, 21 May 2009 10:30:07 -0700 (PDT) Received: by 10.86.26.19 with SMTP id 19mr2359167fgz.48.1242926509598; Thu, 21 May 2009 10:21:49 -0700 (PDT) Received: from localhost ([83.167.112.58]) by mx.google.com with ESMTPS id l19sm11210567fgb.27.2009.05.21.10.21.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 May 2009 10:21:48 -0700 (PDT) Message-Id: <20090521172147.GA29126@cia.no> Date: Thu, 21 May 2009 21:21:47 +0400 From: Vyacheslav Anikin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/134790: [maintainer update] russian/rux: fixes to utf-8 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Vyacheslav Anikin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 17:40:03 -0000 >Number: 134790 >Category: ports >Synopsis: [maintainer update] russian/rux: fixes to utf-8 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu May 21 17:40:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Vyacheslav Anikin >Release: FreeBSD 7.1-RELEASE-p5 i386 >Organization: >Environment: System: FreeBSD cia.no 7.1-RELEASE-p5 FreeBSD 7.1-RELEASE-p5 #0: Sun Apr 26 01:23:07 MSD 2009 root@example.com:/usr/obj/usr/src/sys/ix i386 >Description: Due to second bytes is equals in utf-8 sequences 0xd091 and 0xd191, this port application outputs cyrillic 'yo' instead cyrillic 'B'. >How-To-Repeat: >Fix: --- rux.c.orig 2009-05-21 20:46:40.000000000 +0400 +++ rux.c 2009-05-21 20:50:26.000000000 +0400 @@ -436,9 +436,13 @@ #ifndef DEBUG if (strcmp(i_cp->cp_name, "utf-8") == 0) { + char hook[2]; + hook[0] = o_cp->cp_data[6]; + hook[1] = o_cp->cp_data[34]; + while ((c = getc(in)) != EOF) { if (c == (u_char)0xd0 || c == (u_char)0xd1) { - ; + conv_tab[0x91] = c == 0xd1 ? hook[0] : hook[1]; } else { putc(conv_tab[(u_char) c], out); } @@ -484,8 +488,13 @@ recode_buf(u_char *conv_tab, u_char *buf, int len, FILE *out) { if (strcmp(i_cp->cp_name, "utf-8") == 0) { + char hook[2]; + hook[0] = o_cp->cp_data[6]; + hook[1] = o_cp->cp_data[34]; + while (len--) { if (*buf == (u_char)0xd0 || *buf == (u_char)0xd1) { + conv_tab[0x91] = *buf == 0xd1 ? hook[0] : hook[1]; ++buf; } else { putc(conv_tab[*buf++], out); >Release-Note: >Audit-Trail: >Unformatted: