Blob Blame History Raw
diff -up poco-1.3.6p1-all/Foundation/Makefile.orig poco-1.3.6p1-all/Foundation/Makefile
--- poco-1.3.6p1-all/Foundation/Makefile.orig	2009-12-21 21:14:59.000000000 +0300
+++ poco-1.3.6p1-all/Foundation/Makefile	2009-12-23 14:35:20.457635607 +0300
@@ -43,7 +43,6 @@ pcre_objects = pcre_chartables pcre_comp
 pcre_utf8_objects = pcre_ucd pcre_tables
 
 ifdef POCO_UNBUNDLED
-	objects += $(pcre_utf8_objects) 
 	SYSLIBS += -lpcre -lz
 else
 	objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects)
diff -up poco-1.3.6p1-all/Foundation/src/Unicode.cpp.orig poco-1.3.6p1-all/Foundation/src/Unicode.cpp
--- poco-1.3.6p1-all/Foundation/src/Unicode.cpp.orig	2009-12-21 21:14:59.000000000 +0300
+++ poco-1.3.6p1-all/Foundation/src/Unicode.cpp	2009-12-23 14:27:26.168636009 +0300
@@ -37,56 +37,47 @@
 #include "Poco/Unicode.h"
 
 
-extern "C"
-{
-#include "pcre_config.h"
-#include "pcre_internal.h"
-}
+#include <wctype.h>
+#include <locale.h>
 
 
 namespace Poco {
 
 
-void Unicode::properties(int ch, CharacterProperties& props)
-{
-	const ucd_record* ucd = GET_UCD(ch);
-	props.category = static_cast<CharacterCategory>(_pcre_ucp_gentype[ucd->chartype]);
-	props.type     = static_cast<CharacterType>(ucd->chartype);
-	props.script   = static_cast<Script>(ucd->script);
+//void Unicode::properties(int ch, CharacterProperties& props)
+//{
+//}
+
+
+locale_t get_ctype_locale() {
+	static locale_t locale= NULL;
+	if(!locale)
+		locale= newlocale(LC_CTYPE_MASK, "en_US.UTF-8", NULL);
+	return locale;
 }
 
 	
 bool Unicode::isLower(int ch)
 {
-	CharacterProperties props;
-	properties(ch, props);
-	return props.category == UCP_LETTER && props.type == UCP_LOWER_CASE_LETTER;
+	return iswlower_l(ch, get_ctype_locale());
 }
 
 	
 bool Unicode::isUpper(int ch)
 {
-	CharacterProperties props;
-	properties(ch, props);
-	return props.category == UCP_LETTER && props.type == UCP_UPPER_CASE_LETTER;
+	return iswupper_l(ch, get_ctype_locale());
 }
 
 	
 int Unicode::toLower(int ch)
 {
-	if (isUpper(ch))
-		return static_cast<int>(UCD_OTHERCASE(static_cast<unsigned>(ch)));
-	else
-		return ch;
+	return towlower_l(ch, get_ctype_locale());
 }
 
 
 int Unicode::toUpper(int ch)
 {
-	if (isLower(ch))
-		return static_cast<int>(UCD_OTHERCASE(static_cast<unsigned>(ch)));
-	else
-		return ch;
+	return towupper_l(ch, get_ctype_locale());
 }
 
 
diff -up poco-1.3.6p1-all/Zip/src/ZipStream.cpp.orig poco-1.3.6p1-all/Zip/src/ZipStream.cpp
--- poco-1.3.6p1-all/Zip/src/ZipStream.cpp.orig	2009-12-21 21:15:03.000000000 +0300
+++ poco-1.3.6p1-all/Zip/src/ZipStream.cpp	2009-12-23 14:54:03.101635883 +0300
@@ -35,7 +35,7 @@
 
 
 #include "Poco/Zip/ZipStream.h"
-#include "Poco/zlib.h"
+#include <zlib.h>
 #include "Poco/Zip/ZipArchive.h"
 #include "Poco/Zip/AutoDetectStream.h"
 #include "Poco/Zip/PartialStream.h"