Date: Fri, 5 Sep 2003 13:30:34 +0900 (KST) From: Lee Chung-Yeol <morning@chollian.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: standards/56476: cd9660 unicode support simple hack Message-ID: <200309050430.h854UYFP023881@nnci.kaist.ac.kr> Resent-Message-ID: <200309050440.h854eHQ2085629@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <morning@chollian.net> >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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309050430.h854UYFP023881>