*** xine/xinestream.cpp.old	2009-07-21 19:35:01.000000000 +0900
--- xine/xinestream.cpp	2009-07-21 19:36:39.000000000 +0900
***************
*** 36,41 ****
--- 36,44 ----
  #include "videowidget.h"
  #include "xineengine.h"
  #include "xinethread.h"
+ #ifndef	ORIGINAL_CODE
+ #include "__localeconverter.h"
+ #endif
  
  extern "C" {
  #define this _this_xine_
***************
*** 259,265 ****
--- 262,273 ----
  
      // xine_open can call functions from ByteStream which will block waiting for data.
      //debug() << Q_FUNC_INFO << "xine_open(" << m_mrl.constData() << ")";
+ #ifdef	ORIGINAL_CODE
      if (xine_open(m_stream, m_mrl.constData()) == 0) {
+ #else
+     QByteArray c_mrl = __urlLocaleConverter(m_mrl, URL_CONV_FROMUTF8);
+     if (xine_open(m_stream, c_mrl.constData()) == 0) {
+ #endif
          debug() << Q_FUNC_INFO << "xine_open failed for m_mrl =" << m_mrl.constData();
          switch (xine_get_error(m_stream)) {
          case XINE_ERROR_NONE:
***************
*** 312,318 ****
--- 320,330 ----
              debug() << Q_FUNC_INFO << "creating xine_stream with null video port";
              videoPort = nullVideoPort();
          }
+ #ifdef	ORIGINAL_CODE
          m_deinterlacer = xine_post_init(m_xine, "tvtime", 1, 0, &videoPort);
+ #else
+         m_deinterlacer = xine_post_init(m_xine, "tvtime:method=LinearBlend,cheap_mode=1,pulldown=0,use_progressive_frame_flag=1", 1, 0, &videoPort);
+ #endif
          if (m_deinterlacer) {
              // set method
              xine_post_in_t *paraInput = xine_post_input(m_deinterlacer, "parameters");
***************
*** 750,756 ****
--- 762,772 ----
      };
      bool isUtf8 = false;
      for (int i = 0; !isUtf8 && i < 8; ++i) {
+ #ifdef	ORIGINAL_CODE
          isUtf8 &= checkIsUtf8(meta[i]);
+ #else
+         isUtf8 = checkIsUtf8(meta[i]);
+ #endif
      }
      QTextCodec *codec = QTextCodec::codecForMib(106); // utf-8
      if (!isUtf8) {
***************
*** 1049,1055 ****
--- 1065,1077 ----
                  playbackFinished();
                  return true;
              }
+ #ifdef	ORIGINAL_CODE
              if (!xine_open(m_stream, m_mrl.constData())) {
+ #else
+             QByteArray c_mrl = 
+ 		__urlLocaleConverter(m_mrl, URL_CONV_FROMUTF8);
+             if (!xine_open(m_stream, c_mrl.constData())) {
+ #endif
                  qWarning("xine_open for gapless playback failed!");
                  xine_set_param(m_stream, XINE_PARAM_GAPLESS_SWITCH, 0);
                  m_mutex.unlock();
