NEW! Internationalization Support Announcement
#1
hi,

after a long work :nuts:, i've finally checked-in my changes to support non latin characters in the skin, in file names and in tag information. this supports any language in the world.

to enable this:
1. go to settings -> skin and language
2. select the charset of your choice (english == western europe).
3. select the font set: arial ttf.
3. for hebrew/arabic language also enable the "flip bi di" checkmark.

note: the ttf font in cvs does not support far east languages (chinese, japanese, etc) due to copyright notice on the font. to enable this, copy your arial unicode ms (arialuni.ttf) to xbmc\media\fonts and replace the arial.ttf file found there.

that's it! next on the list is enabling ttf in subtitles... hopefully it will be added soon to complete the i18n mini-project.

to show-off, here are some screenshots:  Cool

-yuval

no, there is no russian translation (any volunteers?). i just translated a few words with babelfish:

Image

chinese system info:

Image

hebrew file names:

Image
Reply
#2
yuvalt, great work!
i've waiting for unicode support long time, i couldn't happier.
i will test this for korean as soon as possible, and send you a language file.

i'm looking forward subtitle ttf support too.
i have a question for subtitle ttf support, will it run on xbmc or mplayer?

:thumbsup: thank you very much!!
Reply
#3
thanks.

not sure where it will run, yet..

-yuval
Reply
#4
thanks yuvalt. now i can view chinese filename now. :thumbsup:
Reply
#5
i've tested unicode support xbmc with ttf font (ms arialuni.ttf - version 1.0) for korean.
overall works great including file (korean characters) acess on xbox hdd, through smb, others.  :lol:

just found two display bugs on gui

some characters in followings don't display properly : settings - general - internet protocol(ip) / http proxy / web server / internet time

Image

and degree character (°c) in weather

Image

except these, everything look perfect !!
thanks again
Reply
#6
im using xbmc 09-09-2004 cvs build
where do i put the ttf fonts in xbmc

i did put the arialuni.ttf to xbmc\media\fonts , but i cannot choose the fonts from settings -> user interface -> skin fonts
Sad

i only can choose latin and hebrew in skin font

thanks :bowdown:
Reply
#7
(danny @ sep. 12 2004,14:54 Wrote:im using xbmc 09-09-2004 cvs build
where do i put the ttf fonts in xbmc

i did put the arialuni.ttf to xbmc\media\fonts , but i cannot choose the fonts from settings -> user interface -> skin fonts
Sad

i only can choose latin and hebrew in skin font

thanks :bowdown:
this feature is included in cvs build 09-11-2004 or later.
Reply
#8
yuvalt, i would like to know if unicode id3v2 tag in mp3 is supported. the info of those mp3s with unicode id3v2 tag cannot be shown.

i have already use arial unicode ms font.
Reply
#9
hi yuvalt,

got your message ... excellent work man!!! :bowdown:
for my purpose, i only want to read chinese filenames ...the dashboard language should remain in english.
how do i go about this?
correct me if i am wrong, i just need to apply steps 1.~3. and "note" below right?

Quote:to enable this:
1. go to settings -> skin and language
2. select the charset of your choice (english == western europe).
3. select the font set: arial ttf.
4. for hebrew/arabic language also enable the "flip bi di" checkmark.

note: the ttf font in cvs does not support far east languages (chinese, japanese, etc) due to copyright notice on the font. to enable this, copy your arial unicode ms (arialuni.ttf) to xbmc\media\fonts and replace the arial.ttf file found there.
Reply
#10
gwlip - you are right.
Reply
#11
(kimp93 @ sep. 12 2004,07:29 Wrote:just found two display bugs on gui

some characters in followings don't display properly : settings - general - internet protocol(ip) / http proxy / web server / internet time


and degree character (°c) in weather

except these, everything look perfect !!
thanks again
degree character - won't work in the way unicode is currently implemented.

display problems -
1. what charset or encoding of korean do you use when you store the file in a text file?
2. is it specific to these labels? what happens if you put these labels in another label? try removing some of the characters.. help me focus on the problem.

-yuval
Reply
#12
(tinyau @ sep. 12 2004,09:45 Wrote:yuvalt, i would like to know if unicode id3v2 tag in mp3 is supported.  the info of those mp3s with unicode id3v2 tag cannot be shown.

i have already use arial unicode ms font.
currently i think only id3v1 is supported (not sure). i don't do any conversion and i think from id3v2 they started to use utf-8.

i'll look into this.

-yuval



Reply
#13
probably, i made you confusing.
it's not a problem with encoding nor specific characters.
if i change the settings of these, it display properly.

for example, if i change the assingment in internet protocol to manual, korean chracters of ip address, gateway, dns sever display correctly.
others are also same ways like on/off setting or change to the other.

problems are only in settings - general - internet protocol(ip) / http proxy / web server / internet time and settings - general - lcd, not in others

i found one more problem. files with unicode name (korean, chinese, japanese..) on cd and dvd burned with iso9660 are not displayed.
when a file name inculde any latin character, only latin character looks ok but recognize, plays well.
Reply
#14
please post me a screenshot of your problem.

i'll look into iso9660

-yuval
Reply
#15
yuvalt, screenshot that i posted before have a problem
first screenshot show broken characters for ip address and gateway.
anyway, i will post other screenshots with correct display.

regarding iso9660, one of my friends made code changes while ago.
take a look at it. it's not for current cvs source. it was for modified version for korean support, but hopefully this can help you little bit.

Quote:--- c:\xbmc/xbmc/filesystem/iso9660.cpp
+++ d:\xbmc/xbmc/filesystem/iso9660.cpp
@@ -20,6 +20,7 @@
*/
#include "iso9660.h"
#include "../utils/singlelock.h"
+#include "../../guilib/converter.h"
#include "stdstring.h"
//#define _debug_output 1

@@ -213,18 +214,21 @@
{
string temp_text;
bool bcontinue=false;
- if ( m_info.joliet &&  !isodir.filename[0] )
- {
- bcontinue=true;
- temp_text = getthintext((wchar*)(isodir.filename+1), isodir.len_fi );
- temp_text.resize(isodir.len_fi/2);
- }
-
- if (!m_info.joliet && isodir.filename[0]>=0x20 )
- {
- temp_text=parsename(isodir);
- bcontinue=true;
- }
+                if ( m_info.joliet && (isodir.len_fi == 1) && (isodir.filename[0] == 0 || isodir.filename[0] == 1) )
+                    {
+                        // . or ..
+ }
+                    else if (m_info.joliet)
+                        {
+                            bcontinue=true;
+                            temp_text = getthintext((char*)isodir.filename, isodir.len_fi*2 );
+                            //temp_text.resize(isodir.len_fi/2);
+ }
+                        if (!m_info.joliet && isodir.filename[0]>=0x20 )
+                            {
+                                temp_text=parsename(isodir);
+                                bcontinue=true;
+ }
if (bcontinue)
{
int semipos = temp_text.find(";",0);
@@ -298,17 +302,21 @@
{
string temp_text;
bool bcontinue=false;
- if ( m_info.joliet &&  !isodir.filename[0] )
- {
- bcontinue=true;
- temp_text = getthintext((wchar*)(isodir.filename+1), isodir.len_fi );
- temp_text.resize(isodir.len_fi/2);
- }
- if (!m_info.joliet && isodir.filename[0]>=0x20 )
- {
- temp_text=parsename(isodir);
- bcontinue=true;
- }
+                if ( m_info.joliet && (isodir.len_fi == 1) && (isodir.filename[0] == 0 || isodir.filename[0] == 1) )
+                    {
+                        // . or ..
+ }
+                    else if (m_info.joliet)
+                        {
+                            bcontinue=true;
+                            temp_text = getthintext((char*)isodir.filename, isodir.len_fi*2 );
+                            //temp_text.resize(isodir.len_fi/2);
+ }
+                        if (!m_info.joliet && isodir.filename[0]>=0x20 )
+                            {
+                                temp_text=parsename(isodir);
+                                bcontinue=true;
+ }
if (bcontinue)
{

@@ -592,15 +600,21 @@


//******************************************************************************************




************************
-string iso9660::getthintext(wchar* strtxt, int ilen )
+string iso9660::getthintext(char* strtxt, int ilen )
{
+ char buffer[1024];
+ memset( buffer, 0, 1024 );
+
m_strreturn="";
- for (int i=0; i < ilen; i++)
- {
- m_strreturn += (char)(strtxt[i]&0xff);
- }
+
+ if( ilen > 255 )
+ ilen = 255;
+
+ ::utf16betoansi( (char*)strtxt, ilen, buffer, 1024 );
+
+ m_strreturn = buffer;
return m_strreturn;
-}
+ }




int utf16betoansi( char* src, int src_len, char* dst, int dst_len )
{
struct conv_struct *cd;
   struct conv_struct *ud;

char* ret = dst;
int t = 0;
int src_index = 0;

if( s_utf16be_conv == null )
s_utf16be_conv = openreader( "utf-16be" );

 if (g_defaultcharreader && s_utf16be_conv) {
  cd = (struct conv_struct *)g_defaultcharreader;
   ud = (struct conv_struct *)s_utf16be_conv;

   ud->istate = cd->istate = '\0';
   while ( src_len > src_index ) {
     
     ucs4_t ch;
     
     if ((t = ud->ifuncs.xxx_mbtowc(ud, &ch, src + src_index, 8)) < 0)
       break;
     src_index += t;

     if ((t = cd->ofuncs.xxx_wctomb(cd, dst, ch, 8)) < 0)
       break;
     dst += t;
   }
 }
 *dst = '\0';
Reply

Logout Mark Read Team Forum Stats Members Help
NEW! Internationalization Support Announcement0