mirror of
https://github.com/yawut/SDL.git
synced 2026-05-05 20:57:28 -05:00
Fixed iconv handling on Solaris 11
--HG-- branch : SDL-1.2
This commit is contained in:
parent
b314a8768e
commit
0d5dbe63e0
|
|
@ -806,6 +806,16 @@ char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inb
|
|||
size_t retCode = 0;
|
||||
|
||||
cd = SDL_iconv_open(tocode, fromcode);
|
||||
if ( cd == (SDL_iconv_t)-1 ) {
|
||||
/* See if we can recover here (fixes iconv on Solaris 11) */
|
||||
if ( !tocode || !*tocode ) {
|
||||
tocode = "UTF-8";
|
||||
}
|
||||
if ( !fromcode || !*fromcode ) {
|
||||
tocode = "UTF-8";
|
||||
}
|
||||
cd = SDL_iconv_open(tocode, fromcode);
|
||||
}
|
||||
if ( cd == (SDL_iconv_t)-1 ) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user