added new test for BOM, and added good defaults for NewDeclaration
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index 67bf205..297c966 100644
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -1351,7 +1351,7 @@
 {

 	XMLDeclaration* dec = new (commentPool.Alloc()) XMLDeclaration( this );

 	dec->memPool = &commentPool;

-	dec->SetValue( str );

+	dec->SetValue( str ? str : "xml version=\"1.0\" encoding=\"UTF-8\"" );

 	return dec;

 }