From owner-freebsd-standards@FreeBSD.ORG Thu Sep 4 21:40:18 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD54516A4BF for ; Thu, 4 Sep 2003 21:40:18 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4903E43FDF for ; Thu, 4 Sep 2003 21:40:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h854eHUp085630 for ; Thu, 4 Sep 2003 21:40:17 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h854eHQ2085629; Thu, 4 Sep 2003 21:40:17 -0700 (PDT) Resent-Date: Thu, 4 Sep 2003 21:40:17 -0700 (PDT) Resent-Message-Id: <200309050440.h854eHQ2085629@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lee Chung-Yeol Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C546516A4BF for ; Thu, 4 Sep 2003 21:32:36 -0700 (PDT) Received: from nnci.kaist.ac.kr (nnci.kaist.ac.kr [143.248.150.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 444B243FEC for ; Thu, 4 Sep 2003 21:32:35 -0700 (PDT) (envelope-from morning@nnci.kaist.ac.kr) Received: from nnci.kaist.ac.kr (localhost [127.0.0.1]) by nnci.kaist.ac.kr (8.12.9/8.12.9) with ESMTP id h854UZMi023882 for ; Fri, 5 Sep 2003 13:30:35 +0900 (KST) (envelope-from morning@nnci.kaist.ac.kr) Received: (from morning@localhost) by nnci.kaist.ac.kr (8.12.9/8.12.9/Submit) id h854UYFP023881; Fri, 5 Sep 2003 13:30:34 +0900 (KST) Message-Id: <200309050430.h854UYFP023881@nnci.kaist.ac.kr> Date: Fri, 5 Sep 2003 13:30:34 +0900 (KST) From: Lee Chung-Yeol To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/56476: cd9660 unicode support simple hack X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Lee Chung-Yeol List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2003 04:40:18 -0000 >Number: 56476 >Category: standards >Synopsis: cd9660 unicode support simple hack >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Sep 04 21:40:16 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Lee Chung-Yeol >Release: FreeBSD 5.1-CURRENT i386 >Organization: KAIST >Environment: System: FreeBSD nnci.kaist.ac.kr 5.1-CURRENT FreeBSD 5.1-CURRENT #2: Fri Aug 29 23:49:22 KST 2003 root@nnci.kaist.ac.kr:/usr/obj/usr/src/sys/MORNING i386 >Description: FreeBSD cd9660 module cannot handle the unicode. Although there is a kernel module for other charset sysutils/cd9660_unicode, it can deal only the single byte charset. This patch is a fix for the cd9660_wchar2char() that is a hook function for translating unicode to char. >How-To-Repeat: Just mount cd with multi-byte charset. >Fix: Fix the isochar function in sys/isofs/cd9660/cd9660_util.c to return consumed number of bytes from the cd9660_wchar2char(). Then, by hooking this, we can write ports similar to cd9660_unicode that offer the translation. Here is the diff file for cd9660_util.c and example cd9660_cp949 port. port is available at http://lovelyworm.sarang.net/ports/cd9660_cp949.tar.gz *** cd9660_util.c.orig Fri Sep 5 13:17:05 2003 --- cd9660_util.c Fri Sep 5 13:18:12 2003 *************** *** 55,61 **** * Should be removed when native Unicode kernel * interfaces have been introduced. */ ! u_char (*cd9660_wchar2char)(u_int32_t wchar) = NULL; /* * Get one character out of an iso filename --- 55,61 ---- * Should be removed when native Unicode kernel * interfaces have been introduced. */ ! int (*cd9660_wchar2char)(u_int32_t wchar, u_char *c) = NULL; /* * Get one character out of an iso filename *************** *** 85,91 **** } /* XXX: if Unicode conversion routine is loaded then use it */ if (cd9660_wchar2char != NULL) ! *c = cd9660_wchar2char((*(isofn - 1) << 8) | *isofn); return 2; } --- 85,91 ---- } /* XXX: if Unicode conversion routine is loaded then use it */ if (cd9660_wchar2char != NULL) ! return cd9660_wchar2char((*(isofn - 1) << 8) | *isofn, c); return 2; } >Release-Note: >Audit-Trail: >Unformatted: