BUG 4759 fixing sql server

charset, now we expecting utf8 from freetds, and we obtain utf8 in propel, so we dont need to do anything to show international unicode characters
This commit is contained in:
Fernando Ontiveros
2011-05-20 19:29:28 -04:00
parent 4aec62825b
commit dbb94e78e6
3 changed files with 15 additions and 15 deletions

View File

@@ -120,17 +120,17 @@ class MSSQLResultSet extends ResultSetCommon implements ResultSet {
return false;
}
}
else {
if (is_array($this->fields)) {
foreach ($this->fields as $sKey => $sValue) {
if (function_exists('mb_detect_encoding')) {
if (strtoupper(mb_detect_encoding($sValue)) == 'UTF-8') {
$this->fields[$sKey] = utf8_encode($sValue);
}
}
}
}
}
//else {
// if (is_array($this->fields)) {
// foreach ($this->fields as $sKey => $sValue) {
// if (function_exists('mb_detect_encoding')) {
// if (strtoupper(mb_detect_encoding($sValue)) == 'UTF-8') {
// $this->fields[$sKey] = utf8_encode($sValue);
// }
// }
// }
// }
//}
if ($this->fetchmode === ResultSet::FETCHMODE_ASSOC && $this->lowerAssocCase) {
$this->fields = array_change_key_case($this->fields, CASE_LOWER);

View File

@@ -42,8 +42,8 @@ class MssqlPlatform extends DefaultPlatform {
$this->setSchemaDomainMapping(new Domain(PropelTypes::INTEGER, "INT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::BOOLEAN, "INT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::DOUBLE, "FLOAT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, "NTEXT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, "NTEXT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, "NVARCHAR(MAX)"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, "NVARCHAR(MAX)"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::DATE, "CHAR(19)"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::BU_DATE, "CHAR(19)"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::TIME, "CHAR(19)"));
@@ -53,7 +53,7 @@ class MssqlPlatform extends DefaultPlatform {
$this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, "IMAGE"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, "IMAGE"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, "IMAGE"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::VARCHAR, "NVARCHAR"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::VARCHAR, "VARCHAR"));
}
/*

View File

@@ -17,7 +17,7 @@
<parameter name="Update_time" value="2007-12-09 14:08:22"/>
<parameter name="Check_time" value=""/>
<parameter name="Collation" value="utf8_general_ci"/>
<parameter name="Checksum" value=""/>
<parameter name="Checksum" value=""/>
<parameter name="Create_options" value=""/>
<parameter name="Comment" value="The application"/>
</vendor>