DictionaryForMids Forum

DictionaryForMIDs for Mobiles (Java ME; most devices from Nokia, Samsungs, RIM (Blackberry), LG, SonyEricsson, Motorola and plenty more) => Problems => Topic started by: mikezang on 04. August 2009, 16:13:34

Title: Does UI use bitmap font?
Post by: mikezang on 04. August 2009, 16:13:34
I want to know if the UI interface also use Bitmap font?

For example, show Chinese UI on Japanese device, is it possible?
Title: Re: Does UI use bitmap font?
Post by: Gert on 04. August 2009, 17:42:46
The Bitmap Fonts are used to show the dictionary content (i.e. the translation result of the search). So for example if you have a Japanese device which does not support the Chinese character font, the Bitmap Fonts will still show you the Chinese character font for the translation !

With the current version of DictionaryForMIDs, the Bitmap Fonts do not yet support the characters on the user interface. So for example if you switch to the Chinese user interface on a Japanese device which does not support the Chinese character fort, then the Chinese characters will not be displayed.

Well, until someone does implement Bitmap Font support for the user interface  - then this will work also  8)

Gert
Title: Re: Does UI use bitmap font?
Post by: mikezang on 05. August 2009, 02:13:54
Now I found that Chinese doesn't displayed on my Japanese device. in my device, the default encode is MS932 (not UTF-9), do you have any suggestion for using bitmap font ?
Title: Re: Does UI use bitmap font?
Post by: Gert on 05. August 2009, 07:22:17
It does not matter what the default encoding of your device is. I am sure that UTF-8 is supported (well I would be very much surprised if nowadays there is any mobile which does not support UTF-8).

Anyway, as far as I know, Bitmap Fonts will work with any encoding.

Still, I do recommend to use UTF-8, because this is the most widely used international encoding standard. For example, with MS932 it might happen that this is not not supported by, say, an European device.

Gert
Title: Re: Does UI use bitmap font?
Post by: mikezang on 05. August 2009, 08:45:03
Is it possible to use some code as below to explicit using UTF-8 in sources?
Title: Re: Does UI use bitmap font?
Post by: mikezang on 05. August 2009, 09:03:55
If I used UTF-8 encode, the exception will be displayed as below:

java.lang.NoClassDefFoundError
at de.kugihan.dictionaryformids.dataaccess.fileaccess.JSR75InputStreamAccess.getInputStream(+27)
at de.kugihan.dictionaryformids.general.Util.openProperties(+39)
at de.kugihan.dictionaryformids.dataaccess.DictionaryDataFile.initValues(+11)
at de.kugihan.dictionaryformids.hmi_java_me.DictionaryForMIDs.<init>(+219)
at java.lang.Class.runCustomCode(+0)
at javax.microedition.midlet.MIDlet.createMIDletInstance(+22)
at javax.microedition.midlet.MIDlet.main(+105)
de.kugihan.dictionaryformids.hmi_java_me.DictionaryForMIDs@d590dbc 100


the code is StorageConnection file = (StorageConnection) Connector.open("file://" + fileLocation);

it is no any problems if I don't use UTF-8 encode.
Title: Re: Does UI use bitmap font?
Post by: mikezang on 05. August 2009, 14:35:29
I got reason for null pointer.

the exception doesn't displayed if I have use "file%3A%2F%2F" to instead "file://".