mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
b1d1b629bc
commit
5b679ea73d
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]->iconv = UNICODE_ENC;
|
||||||
encodingTable[enc]->supported = 1;
|
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
|
else
|
||||||
{
|
{
|
||||||
iconv_t c;
|
iconv_t c;
|
||||||
|
@ -1067,6 +1074,9 @@ tables:
|
||||||
iconv_t cd;
|
iconv_t cd;
|
||||||
const char *estr = iconv_stringforencoding(enc);
|
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)
|
if (estr == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"No iconv for encoding x%02x", enc);
|
NSLog(@"No iconv for encoding x%02x", enc);
|
||||||
|
@ -1576,6 +1586,9 @@ tables:
|
||||||
size_t rval;
|
size_t rval;
|
||||||
const char *estr = iconv_stringforencoding(enc);
|
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)
|
if (estr == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"No iconv for encoding x%02x", enc);
|
NSLog(@"No iconv for encoding x%02x", enc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue