Home » U++ Library support » U++ SQL » umlauts in mysql-update
Re: umlauts in mysql-update [message #22235 is a reply to message #22224] |
Fri, 26 June 2009 14:15 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
michael wrote on Thu, 25 June 2009 14:11 | The problem seems to be somewhere in SqlUpdate:
customer customer;
customer.sqlID = StrInt(sqlData[0]);
customer.name = sqlData[1];
customer.number = StrInt(sqlData[2]);
customer.product = sqlData[3];
customer.version = sqlData[4];
customer.location = sqlData[5];
customer.connection = sqlData[6];
customer.comment = sqlData[7];
PromptOK(customer.name); // Just for debugging
Sql sql(session);
sql * SqlUpdate(SqlId(sqlTable))
(NAME, customer.name)
(NUMMER, customer.number)
(PRODUKT, customer.product)
(VERSION, customer.version)
(STANDORT, customer.location)
(ANBINDUNG, customer.connection)
(BEMERKUNG, customer.comment)
.Where(ID == customer.sqlID);
customer.name contains umlauts as long i update the database with SqlUpdate.
Any idea whats going wrong? As i mentioned before, this problem does not occur using upp 2008.1.
|
Aehm, and when things get broken?
Anyway, the difference (since 2008.1) seems to be in these lines:
if(mysql && mysql_real_connect(mysql, sEmpNull(host), sEmpNull(user),
sEmpNull(password), sEmpNull(database), port,
sEmpNull(socket), 0)) {
Sql sql(*this);
username = sql.Select("substring_index(USER(),'@',1)");
mysql_set_character_set(mysql, "utf8");
sql.Execute("SET NAMES 'utf8'");
sql.Execute("SET CHARACTER SET utf8");
return true;
}
..and then there is code to convert results from UTF-8 to/from actual encoding...
Maybe you could try to set your app to utf-8 and see what happens?
Mirek
|
|
|
Goto Forum:
Current Time: Sat May 18 02:00:33 CEST 2024
Total time taken to generate the page: 0.01692 seconds
|