Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

hello, everyone.

when i use AECHAR * pzText = (AECHAR*)L"chinese character" to display a chinese string, some problem ocurred. it works nice on the emulater, but it cannot display properly on the handset.
Can someone tell me the reason? and how to display Chinese charactor properly??(both on emulator and handset)

thanx very much!
-michael

Hi michael,
Plz. check whether the targeted hardware supports the Chinese Characters or not. If yes. Can you plz. be more specific to the actually error you are encountering while displaying Chinese characters on handset.
Regards,
Ali Naqvi

Hi michael,
Plz. check whether the targeted hardware supports the Chinese Characters or not. If yes. Can you plz. be more specific to the actually error you are encountering while displaying Chinese characters on handset.
Regards,
Ali Naqvi

hi, Ali.
i just use the HelloWorld example, simply repelace the
AECHAR szText[] = {'H','e','l','l','o',' ','W','o', 'r', 'l', 'd', '\0'};
with this one:
AECHAR * szText = (AECHAR *)L"ÄãºÃ"; // means "Hello" in Chinese.
then it displays properly on the emulator, but displays "¡õ¡õ£ß¡õ¡õ¡õ¡õ" on the handset, (of course, the handset is a chinesse brand).
have you known my problem, Ali.
-michael

hi, Ali.
i just use the HelloWorld example, simply repelace the
AECHAR szText[] = {'H','e','l','l','o',' ','W','o', 'r', 'l', 'd', '\0'};
with this one:
AECHAR * szText = (AECHAR *)L"ÄãºÃ"; // means "Hello" in Chinese.
then it displays properly on the emulator, but displays "¡õ¡õ£ß¡õ¡õ¡õ¡õ" on the handset, (of course, the handset is a chinesse brand).
have you known my problem, Ali.
-michael

Quote:AECHAR * pzText = (AECHAR*)L"chinese character"
What kind of chinese character you are trying to display (traditional or simplified)? Your target phone needs to support same type of chinese encoding. Check with the font you are selecting. If the selected font does not have the character you are choosing, then you will not be able to see the string on screen.

Quote:AECHAR * pzText = (AECHAR*)L"chinese character"
What kind of chinese character you are trying to display (traditional or simplified)? Your target phone needs to support same type of chinese encoding. Check with the font you are selecting. If the selected font does not have the character you are choosing, then you will not be able to see the string on screen.

hi, ruben.
1. first, it's simplified chinese character.
2. my phone is simplified supported (it's a chinese phone), but i'm not sure about the BREW environment. you mean just the phone or the BREW environment?
3. i only know that there's only three font in BREW SDK (AEE_FONT_NORMAL, AEE_FONT_BOLD, AEE_FONT_LARGE). i don't know how to choose special fonts in BREW, would you please tell me a way?
many thanx!
-michael

hi, ruben.
1. first, it's simplified chinese character.
2. my phone is simplified supported (it's a chinese phone), but i'm not sure about the BREW environment. you mean just the phone or the BREW environment?
3. i only know that there's only three font in BREW SDK (AEE_FONT_NORMAL, AEE_FONT_BOLD, AEE_FONT_LARGE). i don't know how to choose special fonts in BREW, would you please tell me a way?
many thanx!
-michael

Hello, why I defined chinese chars like this
AECHAR *pzText = (AECHAR *)L"*some chinese chars";
while it didn't work ?
Then how to define wide chars directly ?
Thanx a lot ! :)

Hello, why I defined chinese chars like this
AECHAR *pzText = (AECHAR *)L"*some chinese chars";
while it didn't work ?
Then how to define wide chars directly ?
Thanx a lot ! :)

Try this:
char szSrc[10];
wchar_t szDest[10];
STRCPY( szSrc, "some chinese chars" );
MultiByteToWideChar( CP_ACP,MB_COMPOSITE|MB_ERR_INVALID_CHARS, szSrc, -1, szDest, 10 );
//it can change the code from GB2312 to Unicode, I guess :)
......
IDISPLAY_DrawText( pMe->a.m_pIDisplay, AEE_FONT_BOLD, (AECHAR*)szDest, -1, 0, yPos, rRect, IDF_ALIGN_BOTTOM | IDF_ALIGN_LEFT );
Õâ¸öÂÛ̳֧³ÖÖÐÎÄÂð£¿

Try this:
char szSrc[10];
wchar_t szDest[10];
STRCPY( szSrc, "some chinese chars" );
MultiByteToWideChar( CP_ACP,MB_COMPOSITE|MB_ERR_INVALID_CHARS, szSrc, -1, szDest, 10 );
//it can change the code from GB2312 to Unicode, I guess :)
......
IDISPLAY_DrawText( pMe->a.m_pIDisplay, AEE_FONT_BOLD, (AECHAR*)szDest, -1, 0, yPos, rRect, IDF_ALIGN_BOTTOM | IDF_ALIGN_LEFT );
Õâ¸öÂÛ̳֧³ÖÖÐÎÄÂð£¿

hi, huhengjian .
Have you try that? Can the windows api be used in BREW app??:confused:
regards
-michael

hi, huhengjian .
Have you try that? Can the windows api be used in BREW app??:confused:
regards
-michael

:cool:
i try it at my app server( run in pc ), and when my client applet in the handset received the szDest string, it can display very well!

:cool:
i try it at my app server( run in pc ), and when my client applet in the handset received the szDest string, it can display very well!

hi..
Thank you !!
there is the same problem with me ...but the charactor of japanese..
just like Mr.michael
But my handset doesn`t support the charactor of japanese.
If i have to display, what i should do?
or give me some advise on the software technology...
best Regards!!
Thank you!

hi..
Thank you !!
there is the same problem with me ...but the charactor of japanese..
just like Mr.michael
But my handset doesn`t support the charactor of japanese.
If i have to display, what i should do?
or give me some advise on the software technology...
best Regards!!
Thank you!

If your handset does not support Japanese character and you wish to display Japanese character, you can do so using your own IFONT custom implementation. Search these forums for IFONT, it was discussed in details.

If your handset does not support Japanese character and you wish to display Japanese character, you can do so using your own IFONT custom implementation. Search these forums for IFONT, it was discussed in details.