-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2000-08-29 Akira Higuchi <a@kondara.org> * iconv/gconv_db.c (increment_counter): Reset __init_fct, __fct, and __end_fct fields of struct __gconv_step. * iconv/Makefile (tests): Add iconv-bug2. * iconv/iconv-bug2.c: New file. * iconvdata/euc-kr.c (BODY for FROM_LOOP): Pass 'inend - inptr' instead of 'inptr - inend' to ksc5601_to_ucs4. * iconvdata/sjis.c (BODY for FROM_LOOP): Allow 0x7f character. * iconvdata/iso-2022-cn.c (BODY for FROM_LOOP): If an incomplete character or shift sequence is found at the end of the input string, return__GCONV_INCOMPLETE_INPUT instead of __GCONV_EMPTY_INPUT. * iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-kr.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Return __GCONV_ILLEGAL_INPUT for 8bit characters.
- Loading branch information
Ulrich Drepper
committed
Aug 29, 2000
1 parent
4dadd40
commit c7c3b0e
Showing
13 changed files
with
111 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* Test case by Akira Higuchi <a@kondara.org>. */ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <iconv.h> | ||
|
||
int | ||
main (void) | ||
{ | ||
const char *dummy_codesets[] = | ||
{ | ||
"ISO_8859-1", "ISO_8859-2", "ISO_8859-3", "ISO_8859-4", | ||
"ISO_8859-5", "ISO_8859-6", "ISO_8859-7", "ISO_8859-8" | ||
}; | ||
iconv_t dummy_cd[8], cd_a; | ||
int i; | ||
char buffer[1024], *to = buffer; | ||
char *from = (char *) "foobar"; | ||
size_t to_left = 1024, from_left = 6; | ||
|
||
/* load dummy modules */ | ||
for (i = 0; i < 8; i++) | ||
if ((dummy_cd[i] = iconv_open (dummy_codesets[i], "UTF8")) == (iconv_t) -1) | ||
exit (1); | ||
|
||
/* load a module... */ | ||
if ((cd_a = iconv_open ("EUC-JP", "UTF8")) == (iconv_t) -1) | ||
exit (1); | ||
/* and close it once. we'll reload this later */ | ||
iconv_close (cd_a); | ||
|
||
/* unload dummy modules */ | ||
for (i = 0; i < 8; i++) | ||
iconv_close (dummy_cd[i]); | ||
|
||
/* load the module again */ | ||
if ((cd_a = iconv_open ("EUC-JP", "UTF8")) == (iconv_t) -1) | ||
exit (1); | ||
|
||
puts ("This used to crash"); | ||
printf ("%d\n", iconv (cd_a, &from, &from_left, &to, &to_left)); | ||
iconv_close (cd_a); | ||
|
||
puts ("works now"); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,5 @@ th_TH TIS-620 | |
tr_TR ISO-8859-9 | ||
uk_UA KOI8-U | ||
vi_VN UTF-8 | ||
zh_CN GB2312 | ||
zh_TW BIG5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7634,5 +7634,5 @@ CHARMAP | |
END CHARMAP | ||
|
||
WIDTH | ||
<U3000>..<U9F44> 2 | ||
<U3000>...<U9F44> 2 | ||
END WIDTH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21929,5 +21929,5 @@ CHARMAP | |
END CHARMAP | ||
|
||
WIDTH | ||
<U4E02>..<UFA29> 2 | ||
<U4E02>...<UFA29> 2 | ||
END WIDTH |