mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
redhat 8 bug workaround
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15031 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3d9b554dc5
commit
4d44332b79
2 changed files with 24 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-11-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/Unicode.m: Work around bug in the redhat 8 iconv
|
||||
library ... was sucessfully opening the encoding "" when it shouldn't.
|
||||
|
||||
2002-11-19 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Version: 1.5.1
|
||||
|
|
|
@ -592,7 +592,7 @@ iconv_stringforencoding(NSStringEncoding encoding)
|
|||
{
|
||||
if (GSEncodingSupported(encoding) == NO)
|
||||
{
|
||||
return "";
|
||||
return 0;
|
||||
}
|
||||
return encodingTable[encoding]->iconv;
|
||||
}
|
||||
|
@ -1065,12 +1065,19 @@ tables:
|
|||
size_t outbytesleft;
|
||||
size_t rval;
|
||||
iconv_t cd;
|
||||
const char *estr = iconv_stringforencoding(enc);
|
||||
|
||||
cd = iconv_open(UNICODE_ENC, iconv_stringforencoding(enc));
|
||||
if (estr == 0)
|
||||
{
|
||||
NSLog(@"No iconv for encoding x%02x", enc);
|
||||
result = NO;
|
||||
break;
|
||||
}
|
||||
cd = iconv_open(UNICODE_ENC, estr);
|
||||
if (cd == (iconv_t)-1)
|
||||
{
|
||||
NSLog(@"No iconv for encoding %@ tried to use %s",
|
||||
GetEncodingName(enc), iconv_stringforencoding(enc));
|
||||
GetEncodingName(enc), estr);
|
||||
result = NO;
|
||||
break;
|
||||
}
|
||||
|
@ -1567,12 +1574,19 @@ tables:
|
|||
size_t inbytesleft;
|
||||
size_t outbytesleft;
|
||||
size_t rval;
|
||||
const char *estr = iconv_stringforencoding(enc);
|
||||
|
||||
cd = iconv_open(iconv_stringforencoding(enc), UNICODE_ENC);
|
||||
if (estr == 0)
|
||||
{
|
||||
NSLog(@"No iconv for encoding x%02x", enc);
|
||||
result = NO;
|
||||
break;
|
||||
}
|
||||
cd = iconv_open(estr, UNICODE_ENC);
|
||||
if (cd == (iconv_t)-1)
|
||||
{
|
||||
NSLog(@"No iconv for encoding %@ tried to use %s",
|
||||
GetEncodingName(enc), iconv_stringforencoding(enc));
|
||||
GetEncodingName(enc), estr);
|
||||
result = NO;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue