@@ -104,12 +104,13 @@ class DataUpdate{
104
104
105
105
protected $ table ; //!< table , where actions are stored
106
106
protected $ url ; //!< url for notification service, optional
107
- protected $ sql ; //!< DB wrapper object
108
- protected $ config ; //!< DBConfig object
109
- protected $ request ; //!< DBRequestConfig object
110
- protected $ event ;
111
- protected $ item_class ;
112
- protected $ demu ;
107
+ protected $ sql ; //!< DB wrapper object
108
+ protected $ config ; //!< DBConfig object
109
+ protected $ request ; //!< DBRequestConfig object
110
+ protected $ encoding ="utf-8 " ;
111
+ protected $ event ;
112
+ protected $ item_class ;
113
+ protected $ demu ;
113
114
114
115
//protected $config;//!< DataConfig instance
115
116
//protected $request;//!< DataRequestConfig instance
@@ -141,6 +142,10 @@ public function set_event($master, $name){
141
142
$ this ->event = $ master ;
142
143
$ this ->item_class = $ name ;
143
144
}
145
+
146
+ public function set_encoding ($ encoding ){
147
+ $ this ->encoding = $ encoding ;
148
+ }
144
149
145
150
protected function select_update ($ actions_table , $ join_table , $ id_field_name , $ version , $ user ) {
146
151
@@ -222,8 +227,8 @@ public function get_updates() {
222
227
$ output = $ this ->render_set ($ this ->sql ->select ($ sub_request ), $ this ->item_class );
223
228
224
229
ob_clean ();
225
- header ("Content-type:text/xml " );
226
-
230
+ header ("Content-type:text/xml; charset= " . $ this -> encoding );
231
+
227
232
echo $ this ->updates_start ();
228
233
echo $ this ->get_version ();
229
234
echo $ output ;
@@ -346,4 +351,4 @@ protected function output($res){
346
351
347
352
}
348
353
349
- ?>
354
+ ?>
0 commit comments