[LINUX] Add support for choose UTF8 as an optional language
#1
Hi there,

Support for UTF8 in Linux is far superior than microsoft products. However XBMC for linux inherent some legacy charset support from xbmc for xbox.

Here I will brief describe how to make a drop menu available so choosing UTF8 as a "language" (in region settings) can be made by the end user.

Go to the XBMC root folder which contains the xbmc.bin binary. Then
Code:
cd language
sudo cp -a English UTF8
cd UTF8
sudo vim langinfo.xml

Replace string
Code:
CP1252
by
Code:
UTF-8

In the above example English was used as a template.

A better idea would be include UTF-8 as a charset option.
Reply
#2
utf8 is used internally for just about everything anyway.

The string charset thing is only for things that aren't utf8. As most stuff is, this generally doesn't actually do much of anything.

Perhaps you could detail as to why you would need such an option?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
jmarshall Wrote:utf8 is used internally for just about everything anyway.

The string charset thing is only for things that aren't utf8. As most stuff is, this generally doesn't actually do much of anything.

Perhaps you could detail as to why you would need such an option?

Cheers,
Jonathan

Then could you explain why without the modification I mentioned at top, network share coded in UTF8 (XBMSP) cannot be displayed properly even with proper unicode fonts? Or dear I ask have you tested them properly?
Reply
#4
I will do a verification against beta1 and a recent svn tonight probably with some screen shot.
Reply
#5
It probably simply hasn't been tested.

If the XBMS server is returning UTF8 data by default, then we needn't be doing any charset conversion, and if we are it's a bug.

If it's not returning UTF8 data, then we need to do conversion, and if we're not it's a bug.

Ideally we'd check for UTF8 before converting - there's a patch on trac to do this for some things already.

Perhaps you could check what XBMS the server is doing (if anything) with the charset?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
jmarshall Wrote:It probably simply hasn't been tested.

If the XBMS server is returning UTF8 data by default, then we needn't be doing any charset conversion, and if we are it's a bug.

If it's not returning UTF8 data, then we need to do conversion, and if we're not it's a bug.

Ideally we'd check for UTF8 before converting - there's a patch on trac to do this for some things already.

Perhaps you could check what XBMS the server is doing (if anything) with the charset?

Cheers,
Jonathan

Hi Jonathan,

Thanks for your reply. I tested it yesterday. Without the enforcement of UTF-8 charset, some may not be displayed correctly.

The main purpose of using XBMS is it's a simple/slim protocol and has been exported to various platform including arm, mips, x86 etc.

The XBMS server is running on a recent headless ubuntu 8.04 and it's started as a init script so the LOCAL env probably not set up as UTF8.

Is there a way to examine whether XBMS server are outputing UTF8 characters? (tcpdump or telnet, my guess).

Many thanks for your help
Reply
#7
As a test (I presume you can build yourself?), replace all the:

Code:
g_charsetConverter.stringCharsetToUtf8()

with

Code:
g_charsetConverter.unknownToUTF8()

calls in xbmc/FileSystem/XBMSDirectory.cpp. There's 4 of them.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Add support for choose UTF8 as an optional language0