Gary Anderson wrote:
> I am passing the following UTF8 string (Values are
hangul characters
> given in hex. Ignore spaces) to the converter:
>
> E8 87 BA E7 81 A3 E5 9C B0 E5 8D 80 E5 9C 8B E6 B0
91 E6 89 80
> E5 BE 97.
>
> YAZ correctly translates this string to (output in
MARC8, hex, ignore
> spaces):
>
> 1B 28 42 21 54 2B 21 49 43 21 37 79 21 34 55 21
37 6f 21 46
> 4d 21 3F 75 21 30 6A
> esc $ 1
>
> Notice that the ending escape sequence (ESC ( B) was
not appended to
> this string. It appeared at the beginning of my
> next string.
> I'm thinking that the yaz_write_marc8_page_chr module
you sent in the
> patch isn't working, or it needs to be called from
somewhere else.
>
> Gary
>
>_______________________________________________
>Yazlist mailing list
>Yazlist lists.indexdata.dk
>http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list
>
>
The code I have in siconv.c after applying the patch is:
// This added as a result of a patch sent Mar. 16, 2007 to
handle
closing ESC sequences
static size_t yaz_write_marc8_page_chr(yaz_iconv_t cd,
char **outbuf, size_t
*outbytesleft,
const char
*page_chr)
{
const char *old_page_chr = cd->write_marc8_page_chr;
if (strcmp(page_chr, old_page_chr))
{
size_t plen = 0;
const char *page_out = page_chr;
if (*outbytesleft < 8)
{
cd->my_errno = YAZ_ICONV_E2BIG;
return (size_t) (-1);
}
cd->write_marc8_page_chr = page_chr;
if (!strcmp(old_page_chr, " |