[mythtv] [patch][i18n] MythWeb japanese translation and video and music file link fix

Hirobumi Shimada shimada at systemcreate-inc.com
Sat Jan 29 03:12:10 EST 2005


mythweb.japanese.patch.bz2
	Updating Japanese translation.

mythweb.unicode.patch
	The link is not correct in the file name of video and music when there
is character other than latin1, because the file name of the link is
made from UTF-8. when system use to UTF-8 encoding, it is no  problem.
This patch is link is made with the encoding of the system. The encoding
of the system sets it to "fsencoding" of conf.php.

ex.
	// default value
	define('fsencoding', 'ISO-8859-1');

	// for many japanese
	define('fsencoding', 'EUC-JP');


Thanks

Hiro

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythweb.japanese.patch.bz2
Type: application/octet-stream
Size: 1595 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050129/0348d93e/mythweb.japanese.patch.obj
-------------- next part --------------
Index: mythmusic.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/mythmusic.php,v
retrieving revision 1.6
diff -u -r1.6 mythmusic.php
--- mythmusic.php	24 Jan 2005 03:35:54 -0000	1.6
+++ mythmusic.php	29 Jan 2005 07:35:35 -0000
@@ -102,7 +102,7 @@
                 global $musicdir;
                 foreach (preg_split('/\//', substr($this->filename, strlen($musicdir))) as $dir) {
                     if (!$dir) continue;
-                    $this->urlfilename .= '/'.rawurlencode($dir);
+                    $this->urlfilename .= '/'.rawurlencode(mb_convert_encoding($dir, fsencoding, 'UTF-8'));
                 }
 
                 return(true);
Index: video.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/video.php,v
retrieving revision 1.9
diff -u -r1.9 video.php
--- video.php	24 Jan 2005 03:35:54 -0000	1.9
+++ video.php	29 Jan 2005 07:35:35 -0000
@@ -120,7 +120,7 @@
         $this->url = video_url;
         foreach (preg_split('/\//', substr($this->filename, strlen($videodir))) as $dir) {
             if (!$dir) continue;
-            $this->url .= '/'.rawurlencode($dir);
+            $this->url .= '/'.rawurlencode(mb_convert_encoding($dir, fsencoding, 'UTF-8'));
         }
     }
 }
Index: config/conf.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/config/conf.php,v
retrieving revision 1.27
diff -u -r1.27 conf.php
--- config/conf.php	1 Dec 2004 07:30:37 -0000	1.27
+++ config/conf.php	29 Jan 2005 07:35:35 -0000
@@ -37,6 +40,9 @@
     provided for your convenience.
 ***/
 
+// file system encoding, uses music and video file link to local file
+    define('fsencoding', 'ISO-8859-1');
+
 // Path to the image cache directory
     define('image_cache', 'image_cache');
 


More information about the mythtv-dev mailing list