Enabling non-latin (aka Unicode) fonts in MP (1 Viewer)

A

Anonymous

Guest
[I think it has not yet been covered in the tips forum]

Want MP to be able to display your files or MP3 tags in the language that uses non-latin fonts? Let's say you want to display Greek (Russian, etc.) file names in MP and you still use English as a GUI language

1. Go to http://www.unicode.org/charts/ and get the max index of the character set you're going to display. for example - for Greek that would be 03FF. Convert that to decimals - 1023

2. Go to the language folder then go to the language you're using in MP (that would be "english") and edit your strings.xml - enter the value from step 1 into the characters tag.

3. Restart MP :)

A couple of notes

- version 0.1.0.10 supports up to 5000 characters, any bigger value you enter will not have any effect.

- current MP way of dealing with fonts is to preload all the characters in video memory, if you get blurry results that means that the character range you entered is too big for MP to handle and you're pretty much out of luck (I'd be glad to be proven wrong here)

- If you feel that staring of MP takes forever after you increased the number of characters, try to select a skin with fewer number of fonts, or modify your skin to reduce the number of fonts by reusing some of them. I found that this can noticeably improve startup time
 

yian

Portal Member
August 2, 2004
6
0
Khalkis, Greece
Hi there

Thanks for the tip. It worked fine until I maximized the visualization (pressing the key "x").

When I returned back to normal the fonts were wrong again.

After restarting MP the fonts are still wrong.
 
S

sanga

Guest
Unicode

I have many foreign MP3 Files for example thai, I have no problem to see Titles and Artists with my eschell (with MS Media) in Thai mixed with english MP3
Tags.
I think the problem is the musik database, which do not use UNICODE,
Is there a way to switch to Unicode and rebuild the database ?
 
A

Anonymous

Guest
Re: Unicode

sanga said:
I have many foreign MP3 Files for example thai, I have no problem to see Titles and Artists with my eschell (with MS Media) in Thai mixed with english MP3
Tags.
I think the problem is the musik database, which do not use UNICODE,
Is there a way to switch to Unicode and rebuild the database ?


This can be caused by a buggy MP3 tagging. You can either re-tag your files with the proper unicode tags or you'd have to recompile MP. current version of tag readers just blindly follows the standard and uses 1252 encoding when no encoding is specified in the tag

TagReaderPlugins\MP3\TextBuilder.cs:

Code:
		public static string ReadASCII(byte[] frame,ref int index)
		{
			string text = null;
			int count = Memory.FindByte(frame,0,index);
			if(count == -1)
			{
				throw new Exception("Invalid Frame");
			}
			if(count > 0)
			{
				Encoding encoding = Encoding.GetEncoding(1252); // Should be ASCII

and

TagReaderPlugins\MP3\ID3v1.cs:

Code:
		public void Deserialize(Stream src)
		{
			BinaryReader reader = new BinaryReader(src);

			// check for ID3v1 tag
			Encoding encoding = Encoding.GetEncoding(1252); // Should be ASCII
See the comment Should be ACSII?

In fact if one ever considers that not the whole world uses latin alphabet, and the fact that dumb MP3 tagging software often uses system default encoding instead of the proper Unicode, then one should write

Code:
Encoding encoding=Encoding.Default;

(or, perhaps UTF-8?)

instead

I proposed a patch a long time ago, apparently nobody from developers are really interested :(

P.S. the database itself is unicode, it is tag reader that fails to notice that MP3 tag is written as is, in the default encoding (whatever was the encoding at the time of tagging) instead of doing a proper unicode
 

koem

New Member
August 6, 2005
2
0
Still the same problem in 1.3.0. Greek fonts, especially in MP3 tags and CDDB info, are wrong!

Will there be any fix in the next releases?
 

Users who are viewing this thread

Top Bottom