Page MenuHomePhabricator

TimedMediaHandler does not support Japanese/Chinese file name
Closed, InvalidPublic

Description

Extension:TimedMediaHandler Work well on Mediawiki 1.27.1. However, it can't play any media with Japanese or Chinese file name.

For example:
[[File:Closer-The-Chainsmokers-Featuring-Halsey.ogg]] Work.

Same file with name changed to
[[File::クローサー-ザ-ザ-チェインスモーカーズは-ハルシー.ogg]]
Does not work at all.

I guess some where need to handle the media file in UTF8 mode.

Event Timeline

Can you be more specific ?

Is this on a private wiki ? It seems to work just fine on:
https://commons.wikimedia.org/wiki/Category:Ogg_sound_files_of_spoken_Chinese

Ha, this is strange. I will test newer version MW with TimedMediaHandler. Problem might exist in php/Apache setting too.

@Baskice: Did you find out anything more here? Any public test case you could link to?

There used to be a bug where some of the javascript was incorrectly using the non-unicode safe escape() method. I fixed it a long time ago, could be what the user is referring to

This might be a bug related to the $wgForeignFileRepos ForeignDBRepo class incompatible, where MW randomly refuse to load some/all ogg file remotely (and mp3, mp4 file if $wgMediaHandlers['audio/mpeg'] = 'Mp4Handler';). However, I can't reproduce the exact sutation where only file with Japanese or Chinese file name can't be handle properly.

For what I know, currently $wgForeignFileRepos with ForeignDBViaLBRepo class work just fine with TimedMediaHandler. No matter local or remote. (MW 1.27.1, 1.28 rc1, and master version tested)

If $wgForeignFileRepos with ForeignDBRepo class were not considered as a feature need to be supported, then this bug report can be safely ignored.

This might be a bug related to the $wgForeignFileRepos ForeignDBRepo class incompatible, where MW randomly refuse to load some/all ogg file remotely (and mp3, mp4 file if $wgMediaHandlers['audio/mpeg'] = 'Mp4Handler';). However, I can't reproduce the exact sutation where only file with Japanese or Chinese file name can't be handle properly.

For what I know, currently $wgForeignFileRepos with ForeignDBViaLBRepo class work just fine with TimedMediaHandler. No matter local or remote. (MW 1.27.1, 1.28 rc1, and master version tested)

If $wgForeignFileRepos with ForeignDBRepo class were not considered as a feature need to be supported, then this bug report can be safely ignored.

Could you please not accidentally mention "Chinese" here? I also installed a MW 1.27.1 instance on my localhost, and by uploading both 测试-1.svg and 測試-2.svg (of which I drew the word "NULL" with my mouse) and opening both, as far as I know both are works for me. It also means, could you please mention at least one Chinese example here?

The file with name [[File:クローサー-ザ-ザ-チェインスモーカーズは-ハルシー.ogg]] was not loaded during test. It was wrote there just for an example.
Most developer here, as a community heavily dominated by American/European, generally treat Asia/Middle East writing system together as "something they don't use". In most of bug that I found related to languages, bugs related to any single language of Chinese/Japanese/Korean will be problem for others. (The only exception is bug in the Traditional Chinese and Simplified Chinese conversion system.) Arabic might have problem as well. Germanic/Romance languages tend to have less incompatible, since most of developer master some of them expect English. Solving incompatible bugs related to languages generally don't need developer master those languages. Don't simply avoid language incompatible due to hardness of language itself or due to that language lack of global Influence. Instead, developer need to be aware of coding/transcoding with language they don't use.

@Liuxinyu970226
I could give you a buggy sutation that have been confirmed on Oct 30th at Chinese Moegirlpedia. File with Chinese file name [[File:欧忒耳佩.ogg]] were not loaded by TimedMediaHandler, when $wgForeignFileRepos ForeignDBRepo class were used in MW 1.27.1 with PHP 7.0.12-1~dotdeb+8.1 (fpm-fcgi) and nginx/1.11.5. File were loaded though remote server by url guessing with same environment. There were link generated for the file but the player interface were not loaded.

You might want to read the discuss here: https://zh.moegirl.org/Talk:%E8%AE%A8%E8%AE%BA%E7%89%88/%E5%AD%98%E6%A1%A3/2016%E5%B9%B411%E6%9C%88#.E3.80.90.E5.91.8A.E7.9F.A5.E3.80.91.E8.AF.B7.E5.B0.BD.E5.BF.AB.E6.8A.8Aflashmp3.E6.9B.BF.E6.8D.A2.E6.8E.89

There is one more thing that you should pay attention.

Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. SVG images and their behaviors are defined in XML text files. https://en.wikipedia.org/wiki/Scalable_Vector_Graphics

SVG file is image, which would never ever handled by TimedMediaHandler. TimedMediaHandler is a extension for audio and video. More info can be found here: https://www.mediawiki.org/wiki/Extension:TimedMediaHandler

@Baskice Are you saying the Japanese script issues are just Chinese script issues? And probably vice versa?

There exists no such file as File:欧忒耳佩.ogg..

I'll believe you, but you need to give me a link that reproducibly shows the problem. The developers can't go around guessing where a problem might come from, the codebase is too big for that.

Cannot reproduce on test2. See https://test2.wikipedia.org/wiki/Sandbox/TestTimedMediaChinese. Inserted a file called 欧忒耳佩.ogv, and works fine.

Aklapper changed the task status from Open to Stalled.Jan 5 2017, 8:22 PM

@Baskice: Setting task status to stalled until a testcase with steps to reproduce and conditions is provided.
As TheDJ already wrote, https://zh.moegirl.org/File:欧忒耳佩.ogg (mentioned in T149771#2835052) does not exist.

brion subscribed.

Closing out; please reopen if/when a link to a page that demonstrates the problem is available.