ext/riconv.c in rjb-1.1.2 vs ext/riconv.c in rjb-1.1.3
- old
+ new
@@ -10,11 +10,11 @@
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * $Id: riconv.c 58 2008-01-14 08:25:07Z kuwa1 $
+ * $Id: riconv.c 65 2008-03-26 13:19:29Z arton $
*/
#include "ruby.h"
#include "extconf.h"
@@ -28,14 +28,14 @@
static const char* const NL_SJIS_TABLE[] = { "SHIFT_JIS", "SHIFT_JISX0213", "WINDOWS-31J" };
#endif
#if defined HAVE_SETLOCALE
#include <locale.h>
+#endif
static const char* const LOCALE_EUC_TABLE[] = { "japanese", "ja_JP.eucJP", "japanese.euc", "ja_JP", "ja_JP.ujis" };
static const char* const LOCALE_SJIS_TABLE[] = { "japanese.sjis", "ja_JP.SJIS" };
static const char* const LOCALE_UTF8_TABLE[] = { "ja_JP.UTF-8", "ja_JP.utf8" };
-#endif
#include "riconv.h"
static const char* const CS_EUCJP = "EUC-JP";
static const char* const CS_CP932 = "CP932";
@@ -106,10 +106,9 @@
result = CS_SJIS;
#elif defined HAVE_SETLOCALE
setlocale(LC_ALL, ""); //initialize
result = get_charcode_name_by_locale(setlocale(LC_ALL, NULL));
#elif defined HAVE_GETENV
- printf("HAVE_GETENV\n");
if (result = get_charcode_name_by_locale(getenv("LC_ALL")))
;
else if (result = get_charcode_name_by_locale(getenv("LC_CTYPE")))
;
else if (result = get_charcode_name_by_locale(getenv("LANG")))