bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] Re: add and version


From: Bruno Haible
Subject: [bug-gnu-libiconv] Re: add and version
Date: Sun, 13 Jul 2008 20:49:13 +0200
User-agent: KMail/1.5.4

Hi,

> playing with adding one
> of my own binary 8 bit encodings following the procedures
> in the NOTES. I based my original mapping from
> ftp://ftp.unicode.org:/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT
> added a couple of entries and then generated the following
> cp1252full.h using "8bit_tab_to_h"
> 
> then I added the following to
> 
> -- encodings.def
> DEFENCODING(( "CP1252FULL",
>                "WINDOWS-1252-FULL",
>                "MS-ANSI-FULL",
>                "CP1252PREGEX",
>              ),
>              cp1252full,
>              { cp1252full_mbtowc, NULL },      { cp1252full_wctomb, NULL })
> 
> --- flags.h
> #define ei_cp1252full_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS)
> 
> --- converters.h
> #include "cp1252full.h"
> 
> make distclean && ./configure --enable-static=yes --enable-shared=no
> --enable-relocatable --enable-extra-encodings && make
> 
> everything compiles, and I see the symbols
> in "lib/.libs/libiconv.a"
> 
> 001368a0 s _cp1252full_2uni
> 00006350 t _cp1252full_mbtowc
> 00136840 s _cp1252full_page01
> 00136820 s _cp1252full_page02
> 001367e0 s _cp1252full_page20
> 001367c0 s _cp1252full_pagefb
> 000063a0 t _cp1252full_wctomb

Looks all right.

> However, when I do src/iconv_no_i18n -l, I don't see my addition in
> the listing, likewise using "iconvlist()" from within a C program.
> and naturally iconv_open/iconv crashes when using this mapping

Did you do a "make -f Makefile.devel", to regenerate the aliases*.h files?
That should fix it.

> static const unsigned short cp1252full_2uni[32] = {
>    /* 0x80 */
>    0x20ac, 0xfb01, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
>    0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0xfb02, 0x017d, 0x2260,
>    /* 0x90 */
>    0x221e, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
>    0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xf8ff, 0x017e, 0x0178,
> };

Just curious: Where did you get this mapping table from? It's not among the
variants of CP1252 that I list at
  http://www.haible.de/bruno/charsets/conversion-tables/CP1252.html

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]