View Full Version : Adding Character Symbols In 3310
markaidestine
10-03-2003, 01:44 AM
I would really appreaciate if u can help me how to add a symbol like "degree, copyright ....etc" in 3310 v 579, ive been trying it for so many times by adding \xA9 ...etc in adding characters but still no success.... please help me how to do it! THANKS IN ADVANCE pals hoping for ur response!!
Manipulator
10-03-2003, 03:23 AM
i think of this before,but what i think ,if your phone has modify and the the chart.. in the font part,but the receiver don have the chart on the font part,he will cant see the chart.
fruit
10-03-2003, 07:18 PM
Originally posted by Manipulator
i think of this before,but what i think ,if your phone has modify and the the chart.. in the font part,but the receiver don have the chart on the font part,he will cant see the chart.
Taht's not true. Use PPMEdit and look at the fonts. if fonts contains character U wat then recivier will see it but U must send message as UNICODE. (of course we are talking about some typical characters like copyright not about chineese letters for example. Copyright sign is almoust in all font sets i think.)U can add any character from font chunk into list of special chars (under * key) but if U want to do that you propably must remap character table in LPCS chunk. If u r intrested how to do that then I can tell U...
Fruit
gkagg
10-03-2003, 07:30 PM
@fruit
How can you remap character table in LPCS chunk? Have you done it successfully?
CU...
fruit
10-03-2003, 08:35 PM
Yes i've done it when I was translateing 3350 flash (thx again for your help). and it's working for me now. I've done much more - i modified font chunk also.
About LCPS:
at first you must understand structure of LCPS ad how it's working. When phone is going to display character for example 'a' letter (0x61 which is 97 decimal) its looking into LCPS chunk and useing infrormation from it translate 0x61 (1 byte, let's call it Nokia character code) into UNICODE character code which should represtent shape of 'a' letter (2 bytes it's 0x0061 in our example). Than phone looks into a font chunk, looks for desired font type, looks into font characters definition table, and for UNICODE id of character we want to display in this table. If foud character's bitmap is displayed. If not, default character's bitmap will be displayd (which character is default is defined in one character def. tables). But let's back into LCPS.
LCPS contains (as far as i know) one table that describes how to thanslate all of 1 byte coded characters into 2 byte long unicode characters. So, table contains 256 (dec) entries. Get any nokia flash image open it with All PPMMaker, open LCPS chuk then you will see propably 2 subchunks first one - this with coded wersion name is what we r interested in second one is empty one. Right click on correct subchunk and export it into external file then open this file in hex editor. And now:
First 4 bytes contains suchunk id (from offset 0x0)
next 4 bytes contains length of subchunk (from offset 0x4)
next 4 bytes contains short version name (from offset 0x8 )
next 4 bytes are not used (as far as i know) (from offset 0xc)
next 512 bytes contains translation table (from offset 0x10)
Structure of this table is easy to understand: one after another it contais 256 (dec) 2 bytes long records. Position of record is determined by 'Nokia character code' and value stored in this record is UNICODE code of character into which we want to translate 'nokia coded' char.
So in our example if we want to find record coresponding to 'a' letter it's under offset:
0x10+ 2*0x61=0xD2 counting from the begining of the file.
How i calculate it?
0x10 - becouse we have header before translation table
2 becouse records are 2 bytes long
0x61 becouse 'a' value in 'Nokia character code' is 0x61
so we ar moving into offset 0xD2 and what we can see?
0061
It's unicode code for 'a' letter. Now you can change it to aything you want and it will be displayed in place of 'a' letters. :)
Most of character codes are compatible with ASCII chars but some of them like 253,254,255 (dec) u can use in your own purpose for example to create Your own graphics under *#0000#... There are very many posibilities.
Fruit
Ps. Sorry 4 my english...
gkagg
10-03-2003, 09:48 PM
@fruit
THX very much for your gr8 help m8!!!
PS: how did u modify the font chunk?
Manipulator
11-03-2003, 09:36 AM
Originally posted by fruit
Taht's not true. Use PPMEdit and look at the fonts. if fonts contains character U wat then recivier will see it but U must send message as UNICODE. (of course we are talking about some typical characters like copyright not about chineese letters for example. Copyright sign is almoust in all font sets i think.)U can add any character from font chunk into list of special chars (under * key) but if U want to do that you propably must remap character table in LPCS chunk. If u r intrested how to do that then I can tell U...
Fruit
u have miss understand what i trying to say,ofcourse if the fonts contains character U wat then when you send it,sure the receiver will see it.
but i talking about that you have add you own character into the fonts part,then if you use the added character to send a sms to a receiver phone that dont have the modified font,then it cant see your character.
by the way,are you sure there is a copyright character in the fonts part.maybe you have it in you 3350,it seem like i never saw one in 3310.
hamm,maybe i'm wrong.:p ;) :cool: :o
fruit
11-03-2003, 06:50 PM
Hi
Oh with font chunk I had some hardcore work... At first u MUST understand structure of this chunk.. I'ts not easy to explain it - and I dont know it also in 100%... Some info U can find here:
http://www.geocities.com/nok5rev/ppm_font.html
I can write only what I did so:
I was wanted to have in 3350 char with unicode id 0x0118 (its special polish E). Becouse character was absent in font chunk i had 2 ways: redraw shape of this letter in place of another chaacter but it will have wrong unicode id or redraw it and correct this id. When i looked at fonts in PPMManager i found that signs ar ordered with growing unicode ID but also that there are 'holes' for example
0x0110 0x0111 0x011E 0x011F
charactes 0x0112 to 0x011D were absent so my 0x0118 also..
what i did: I found definition of character 0x011E and changed it code to 0x0118 so i had:
0x0110 0x0111 0x0118 0x011F
and growing order of characters Id's was kept.
i have done that for all 5 fonts then opened file with PPMEDIT and redraw characters shape. Becouse of specific characters of my language i've changed 12 chars in each font in that way.
I think that u r interested how to locate character definition in font chunk. At first read carefully info under the link above. I'll give u an example. Open file i attached in next post in hex editor. This is subchunk of font chunk from 3350 PPM D extracted with Al's PPMMaker. What we can see is:
first 4 bytes are subchunk id (from offset 0x0000 )
next 4 bytes contains length of subchunk (from offset 0x0004 )
next 8 bytes are unused as far as i know (from offset 0x0008 )
next 4 bytes contains number of fonts in this subchunk. In our example it's 9 (from offset 0x0010)
from this point (offset 0x0014) we have 9 (becouse we have 9 fonts) records which are 0x2c B long - each of them. For example we want to change character 0x011E to 0x0118 in font large/bold. large/bold is second font in subchunk (look at PPMedit) so we need to move into start of 2ond record so we are moveing 2cbytes forward into offset 0x0040. Let's call this point our start point. Now we should move 0x14 B forward from our start point (offset from egenning of the file 0x0054) byte under this offset contains flags. Each of records in which we are defines next 3 tables and contain info where they are located in subchunk. Each of first 3 bits in flags detemines how to calculate adreses of this 3 tables (remember that bits are counted from 0 so we are interested in bits 0,1,2 and especialy in bit 2). If bit is set to 1 then adress of coressponding table is counted from our start point. in our example flags are =0x07 so binary it's 00000111. Bit 02 is set to 1 so we will count adress from our start point. now, let's move back to start point at offset 0x040 counted from begining of the file (subchunk). Now, lets move 0x8 bytes forward from this point. Next 4 bytes contains adress in subchunk of table let's call it table1 counted from our start point (becouse bit 2 in flags was 1) in our example it's: 0x00000378.
Back to startpoint again (0x40 from begining of subchunk). And now 0x378 B forward...
Now we are at the begening of table1. It's structure is quite easy:
[first character's unicode ID (2 bytes)] [last character's inicode ID (2 bytes)] [4 bytes of character's info data]
if record describes 1 character then 2 first fields are equal. now we must find record that defines character id 0x011E so we are moveing forward, record after record till we find at offset 0x0708 (counted from the begining of the file/subchunk) record that looks that way:
0x011e 0x011e 0x00BFDDAA
This is what we are looking for. Record defines only 1 character so we change 1 and second value with same number:
0x0118 0x0118 0x00BFDDAA
this record was simple.
but if we want to change record that defines more than 1 character i think (maby i'm wrong) we shouls remember that number of characters described by record should be same after and before conversion. So if we have (2 records after this 1):
0x0128 0x0129 0x002D95AA
and we want to change 0x0128 into 0x0120 we should replace 0x0129 with 0x0121
0x0120 0x0121 0x002D95AA
save file.
Import back into flash file, save flash file, view it with PPMEdit. Unicode id of our character should be changed... Now open second copy of PPMEDIT with font chunk from other nokia model which contains same font size and find character of our id and redraw character's shape in edited font chunk so it should have now correct id and correct shape.. Do same for all font sizes.
Uffff... :)
SU.
Fruit
:)
fruit
11-03-2003, 06:54 PM
I forgot atrachment....
Powered by vBulletin® Version 4.2.0 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.