mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Workaround for iconv_open() bug on redhat
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15033 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8fb4fc795d
commit
e91f61f8c1
1 changed files with 13 additions and 0 deletions
|
@ -253,6 +253,13 @@ static BOOL GSEncodingSupported(NSStringEncoding enc)
|
|||
encodingTable[enc]->iconv = UNICODE_ENC;
|
||||
encodingTable[enc]->supported = 1;
|
||||
}
|
||||
else if (encodingTable[enc]->iconv[0] == 0)
|
||||
{
|
||||
/* explicitly check for empty encoding name since some systems
|
||||
* have buggy iconv_open() code which succeeds on an empty name.
|
||||
*/
|
||||
encodingTable[enc]->supported = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
iconv_t c;
|
||||
|
@ -1067,6 +1074,9 @@ tables:
|
|||
iconv_t cd;
|
||||
const char *estr = iconv_stringforencoding(enc);
|
||||
|
||||
/* explicitly check for empty encoding name since some systems
|
||||
* have buggy iconv_open() code which succeeds on an empty name.
|
||||
*/
|
||||
if (estr == 0)
|
||||
{
|
||||
NSLog(@"No iconv for encoding x%02x", enc);
|
||||
|
@ -1576,6 +1586,9 @@ tables:
|
|||
size_t rval;
|
||||
const char *estr = iconv_stringforencoding(enc);
|
||||
|
||||
/* explicitly check for empty encoding name since some systems
|
||||
* have buggy iconv_open() code which succeeds on an empty name.
|
||||
*/
|
||||
if (estr == 0)
|
||||
{
|
||||
NSLog(@"No iconv for encoding x%02x", enc);
|
||||
|
|
Loading…
Reference in a new issue