View Full Version : Unicode font/language support in XBMC for Windows?
cywang23
2008-07-29, 12:42
I used XBMC on XBOX for several years, and during last 1 year, I found the XBMC on XBOX supports Unicode display on SMB connection. I use Windows 2003 as file server and XBMC on XBOX works very well, no matter display Chinese or Japanese file name.
Now I am trying XBMC on Windows, some files on my PC is in multi-language file name, include Chinese words and Japanese words. My system is BIG5 Chinese Vista 32bit, all Chinese words works fine with XBMC, but Japanese words not.
Anyone knows how to fix it?
cywang23
2008-07-29, 12:53
Besides, I found UTF-8 subtitle support is gone in XBMC windows version, but UTF-8 subtitle (*.srt) works well in XBMC XBOX version.
neoanderson2002
2008-07-30, 01:13
Hi Cy,
I had the same problem.
You have to change the font in your skin to a Unicode ttf that supports more than one language. For example, Cyberbit.ttf (no longer provided by seller, search for it) or Arialuni.ttf (installs with MS Office) contain Chinese, Japanese, and Korean characters. Copy and paste into the skin's font folder. Then go to the language xml files and change all menu fonts to this font (replace abc.ttf with arialuni.ttf). (Save a copy of original in case something goes wrong.)
So far it has worked for most of my files but having some problems where it just shows ??? or boxes. I think it's because it is not coded in UTF but in Big5/GB? So I am renaming some stuff manually and it shows up correctly. If anyone has a better solution, please let me know!
Cheers,
Neo
neoanderson2002
2008-07-30, 01:14
the picture above should be question marks!
cywang23
2008-07-30, 03:04
Yes, I have already replace arial.ttf with arialuni.ttf and rename arialuni.ttf to arial.ttf, so all the menu are display correctly in Traditional Chinese. Only file names contain both Chinese & Japanese words are displayed some broken character, and can not be selected to playback. But XBMC for XBOX doesn't have the same problem?
jmarshall
2008-07-30, 03:10
Probably because your filesystem is returning data differently. Are you viewing said files over a smb connection? Are the files local?
cywang23
2008-07-30, 03:31
I can't use SMB connection on XBMC for Windows, don't know there is no support SMB in XBMC for Windows or just I don't know how to add the correct SMB path? but in XBMC for XBOX I can use SMB:// to connect to my Windows Server 2003.
So I map some folder from Windows Server 2003 to my local Vista and become some drive letter, then I use the drive letter in XBMC for Windows, just show only Traditional Chinese and English words, can't show Japanese words.
Besides, subtitle also didn't support UTF-8 in XBMC for Windows, but works in XBMC for XBOX.
jmarshall
2008-07-30, 03:37
Regarding subtitles: That's dvdplayer's subtitle parsing vs mplayers. You'll find the same thing will happen if you "play using dvdplayer" on xbox. Please post a bug on trac regarding the subtitles with an appropriate subtitle file attached.
The filesystem stuff probably needs some alterations to get it to work on xbmc - we currently read it as if it is in the charset you specify. It possibly needs to be read using the wchar versions of the win32 API. If you could specify EXACTLY how we could reproduce it on our machines then that would be great. Possibly all we need is your filenames (unaltered) so perhaps zipping up a couple of example files may do it - I'm not sure.
And yes, the built in smb client will work just fine - I believe the "browse" feature of smb isn't working well as yet (there's been positive reports from newer versions, however), but you should be able to input the full path to your server via the add source dialog. Please confirm.
Cheers,
Jonathan
neoanderson2002
2008-07-31, 09:22
Hi John and CY,
I found that it worked if using an older version 12 of Aeon but not in newer version 14. What I mean is that the menu language change would display Chinese unicode correctly but the actual file names would not in v14 but both Menu and filenames work perfectly in v12. Maybe try older version of skin you are using? Or is there a better way? Your help is greatly appreciated!
Cheers,
-Neo
PS I tried the same thing for the base PM skin and couldn't get GUI menu or file names to work!
PPS I am only using USB External HDD and Internal HDD and not using any networks for media files.
Gamester17
2008-07-31, 17:14
XBMC PM3 skin does not come wih unicode fonts, niether does latest AEON, you have to replace the TTF fonts yourself manually and set the font you want to use in the settings.
neoanderson2002
2008-07-31, 17:55
XBMC PM3 skin does not come wih unicode fonts, niether does latest AEON, you have to replace the TTF fonts yourself manually and set the font you want to use in the settings.
Hi Gamester,
Thanks for the tip. Here is what I did for PM3: I added the Arialuni.ttf file (Unicode font) to the Skin/PM3/font folder. Then I changed the Chinese (Traditional).xml in the Language folder and font.xml in the Skin folder for PM3 by editing in Notepad and replacing all *.ttf to Arialuni.ttf. I then went to settings in XBMC to change to the Chinese Traditional language. Both the Menu GUI and file names are not showing anything at all (or weird symbols) if it is not in English. Changing the font in XBMC settings should not make a difference since I did not make a new "profile" for the font as I simply overridden the existing one (font.xml).
Doing this for Aeon Alpha14 produced better results as the Menu GUI was in Chinese but not the specific file names in File mode.
Similarly, doing this for Aeon Alpha12 resulted in Menu GUI and file names showing up in Chinese for most file names.
(1)Is there another xml file which requires editing for fonts (I am suspecting I did edit something else for Aeon Alpha12 which I am forgetting to do now)?
(2)Should I not use Notepad which may mess up the file?
Greatly appreciate your help!
Cheers,
-Neo
neoanderson2002
2008-08-01, 19:27
http://xbmc.org/trac/ticket/4403
Reported by bb10 - Thanks!
Stay tuned for fix. Thanks to WiSo for looking into it.
I might need the help of jmarshall as he is experienced with charset conversion (I hate that).
Spiff told me to do my tests with German special chars because it might produce the same problem but it works like a charm. So I'm a little stucked here because it's difficult to test Japanese for me ;)
neoanderson2002
2008-08-03, 19:51
Hi everyone,
Thanks for looking into this.
For homescrollers.xml, I wanted to edit the menu items to be bilingual. So I inserted a hyphen and then the Chinese characters for the menu item, using Notepad. Then I clicked save and it prompted me to save the document in UTF-8 rather than ANSI. This resulted in the menu item showing the proper English and Chinese characters! I tried saving all skin xml files to UTF-8 to see if the file names would also change in Movies and TV Shows file view. But that did not work!
Where is the code for extracting file names by the skin? Or is this in the XBMC system folder? I think changing parameters in that code will fix this "bug".
Cheers,
-Neo
jmarshall
2008-08-03, 23:33
Filenames have nothing to do with skin labels.
As you have saved the skin XML's as UTF-8 we KNOW that they're already UTF8, so don't have to do any shenanigans.
When you retrieve filenames from the filesystem we DO NOT necessarily know the charset. The code needs to be updated to do this correctly. As WiSo has pointed out, we can't do all that much without a lot of research into how to do it correctly (most developers do not have asian filenames and so on - most european languages do not require anything extra for them to work.)
Cheers,
Jonathan
neoanderson2002
2008-08-04, 08:10
Hi WiSo and John M.,
Sorry! I re-read the posts and now finally understand it's a charset problem. I'm not that technically inclined in these matters (please take this as my excuse!). Looking forward to any future fixes in subsequent builds regarding this. Thank you very much and greatly appreciate you and your dev teams @ XBMC!
Cheers,
-Neo
neoanderson2002
2008-08-04, 08:13
PS. Please let me know if I can help as a non coder/computer programmer. As per WiSo's request on the Trac, I can't seem to find any free unicode fonts that include all Chinese, Japanese, and Korean characters but there are many free unicode fonts for each individual language.
neoanderson2002
2008-08-10, 07:41
Hello John and WiSo,
It seems to be working in 14676!!! For TV Shows and plot info in custom NFO files in Showcase and List mode. Also works in File mode. Thank you very much!
Cheers,
-Neo
neoanderson2002
2008-08-30, 09:54
Hello John and WiSo,
It seems to be working in 14676!!! For TV Shows and plot info in custom NFO files in Showcase and List mode. Also works in File mode. Thank you very much!
Cheers,
-Neo
Hi everyone,
There was a mistake in my part above. I guess I got too excited when some viewing methods worked for the Asian characters.
Using Atlantis Alpha 4:
Works :grin: - The Library mode displays Asian characters correctly when scanned from local NFO files with a proper Unicode font installed over the default for the skin font. This is regardless of whether choosing English or the Asian Language translations for string.xml. It just works!
Not working: :shocked: File Mode - folder names, file names.
bb10 updated the Trac (http://xbmc.org/trac/ticket/4403) to simply state that it is not working in Atlantis Alpha 4. I would like to add this clarification to the Trac if possible to help reduce the amount of work required to make Asian Characters fully supported.
In my case, I am using Traditional Chinese.
I'll be organizing everything into Library to get this to work. Thank you very much. I would greatly appreciate support later in File Mode if possible! But it's not a high priority item!
Thanks again to XBMC devs and community for your responses and help.
Cheers,
-Neo
cywang23
2008-09-23, 06:26
I have downloaded the Atlantis - Beta 1 version both on my Vista 32bit and Vista 64bit. The folder name contains Asia characters now works very well, no matter on file system or through SMB.
But still can not display UTF-8 srt subtitle. Must be BIG-5 encoding for Traditional Chinese.
neoanderson2002
2008-09-23, 18:34
I have downloaded the Atlantis - Beta 1 version both on my Vista 32bit and Vista 64bit. The folder name contains Asia characters now works very well, no matter on file system or through SMB.
But still can not display UTF-8 srt subtitle. Must be BIG-5 encoding for Traditional Chinese.
Hi Cywang,
WiSo and JMarshall got it working to read file names correctly in File Mode and bb10 and I helped with testing to get it working now.
For the subtitle, I think you have to go to the Video Settings --> Subtitle --> Font. The default font is arial.ttf so it doesn't work. Try changing this and see if it works for you.
Cheers,
-Neo
cywang23
2008-09-25, 11:05
Sorry for the late reply.
Actually I have already replaced the original arial.ttf with arialuni.ttf from MS Office in (XBMC)\media\fonts\. Besides, I have replaced the arial.ttf in theme directory. Now my theme works in Traditional Chinese (UTF-8).
If the subtitle is encoded in BIG-5, I can see the correct chinese characters, but if in UTF-8 can not, and will be displayed in garbage characters.
So I think the UTF-8 subtitle function is still can not work properly.
treefour
2008-09-25, 14:15
Sorry to chime in on this, but I also use Traditional Chinese subs and don't have any problems with either Unicode or Big 5 srt's. Not sure what I am trying to let you know other than it might be a on off problem. ???
neoanderson2002
2008-09-25, 18:19
Sorry for the late reply.
Actually I have already replaced the original arial.ttf with arialuni.ttf from MS Office in (XBMC)\media\fonts\. Besides, I have replaced the arial.ttf in theme directory. Now my theme works in Traditional Chinese (UTF-8).
If the subtitle is encoded in BIG-5, I can see the correct chinese characters, but if in UTF-8 can not, and will be displayed in garbage characters.
So I think the UTF-8 subtitle function is still can not work properly.
cywang,
There's also option in Appearance settings for selecting Western European (ISO) etc. character recognition. Maybe change that to something else to see if it works? I don't play any files with Chinese subtitles so I'm not sure. XP or Vista?
Sorry to chime in on this, but I also use Traditional Chinese subs and don't have any problems with either Unicode or Big 5 srt's. Not sure what I am trying to let you know other than it might be a on off problem. ???
treefour,
No need to be sorry! The more help the better! Did you get it to work without configuring anything? Did you just replace the XBMC system and skin fonts with a unicode font and everything worked? XP or Vista?
cywang23
2008-09-25, 18:25
cywang,
There's also option in Appearance settings for selecting Western European (ISO) etc. character recognition. Maybe change that to something else to see if it works? I don't play any files with Chinese subtitles so I'm not sure. XP or Vista?
I am using Vista 32bit and 64bit. Both the two Vista XBMC can't display UTF-8 subtitle but BIG-5 Chinese works.
cywang23
2008-09-25, 19:02
I just tried WinXP 32bit, still have the same problem.
Maybe someone of you can tell me what the TTF font file you are using for media subtitle and where does it come from?
I just tried WinXP 32bit, still have the same problem.
Maybe someone of you can tell me what the TTF font file you are using for media subtitle and where does it come from?
My own case.
I just copy the arialuni.ttf to media folder. Rename the original arial.ttf to arialbackup.ttf and rename arialuni.ttf to arial.ttf. Do the same to the font folder under skin.
In this way, you don't have to modify any xml file.
One thing, save your subtitle srt file into ANSI instead of UTF-8.
treefour
2008-09-26, 00:12
All I did was replace the replace the existing arial font, with the arialluni font (after I renamed it) then changed the charset to Traditional Chinese under Settings--video--subtitles. I also changed the charset in appearance--region to Traditional Chinese and that was it, everything works. Also my system is in English, I am only displaying Traditional Chinese subs.
I am using a really slimmed down version of Vista, like tiny vista that's floating around the usual places ;) . The only non English font on the thing is the arialuni.ttf (renamed to arial.ttf) in XBMC.
As lymwuwu said one way around it is to use subtitle workshop and save the file to ansi or Big5.
Sorry I couldn't be of more help.
Cheers
treefour
2008-09-26, 00:51
Just checked a few files and everything is alright for me (touch wood) . Not so sure I want to keep playing with it though, as it looks like a few people have problems, and the wife will kill me if I bone up the subtitles with the new TV season just starting up. :p
As lymwuwu said one way around it is to use subtitle workshop and save the file to ansi or Big5.
Sorry I couldn't be of more help.
Cheers
Windows Vista's Notepad could save srt file to UTF-8 or ANSI.
cywang23
2008-10-02, 11:56
So, the "UTF-8" encoding srt file could be used in XBMC for Windows or not?
According to treefour the answer is yes, but lymwuwu said save in ANSI or BIG5.
Which one is the correct?
I have tried many times with UTF-8 srt file, can't be display correctly.
So, the "UTF-8" encoding srt file could be used in XBMC for Windows or not?
According to treefour the answer is yes, but lymwuwu said save in ANSI or BIG5.
Which one is the correct?
I have tried many times with UTF-8 srt file, can't be display correctly.
It's possible only if
1. you use a proper fonts
2. modify xbmc settings so UTF-8 charset are enforced. Look at my post:
http://xbmc.org/forum/showthread.php?p=228034#post228034
I just now stumbled upon this problem when I tried to watch a TV series that had mixed Japanese and English characters (UTF-8 SRT subtitles). I downloaded an arialuni.ttf font. It almost worked but some characters were still missing, also the character spacing was wrong (the Japanese characters overlapped the english ones).
So there appears to be many different "arialuni.ttf" fonts floating around. Some have wrong spacing and are not full range, but I found one that works. Is there any specific reason why not an full range UTF-8 font is default and bundled together with XBMC installation?. I'm sure that would spare people some trouble.