showing special characters
showing special characters
Hi all,
I'm using VTFT in connection with mikroC for ARM. Now I want to show some language specific characters like the german 'ü'. In the used font Tahoma this character has the code x00FC. According to this post http://www.mikroe.com/forum/viewtopic.p ... ic#p216383 this character should be displayed correctly. And in VTFT this character is displayed like expected. But if I start the compiled program, the display dont show the character. How could I get these characters on the TFT?
Any help would be appreciated.
Best regards
Niceday
I'm using VTFT in connection with mikroC for ARM. Now I want to show some language specific characters like the german 'ü'. In the used font Tahoma this character has the code x00FC. According to this post http://www.mikroe.com/forum/viewtopic.p ... ic#p216383 this character should be displayed correctly. And in VTFT this character is displayed like expected. But if I start the compiled program, the display dont show the character. How could I get these characters on the TFT?
Any help would be appreciated.
Best regards
Niceday
Re: showing special characters
When you want to access characters beyond 127 I think you need to re-import the required font into the resources with the character range adjusted to include the desired character. You will also need to adjust the end char property in the component being displayed.
JohnB
MikroPascal for PIC18 and DsPIC, Visual TFT
MikroPascal for PIC18 and DsPIC, Visual TFT
Re: showing special characters
Hi John,
thanks for the quick reply.
Your hint solved the issue. Many thanks!
Best regards
Niceday
thanks for the quick reply.
Your hint solved the issue. Many thanks!
Best regards
Niceday
Re: showing special characters
Hello,
i have the same problem with special character above character 127, but the solution above didn't help me. I have importet the Tahoma font in the resource collection with the character range set to 255 and the 'End Char' of the EVEText was set to 255. I used the 'Ö' character for testing ( char number 214) and all looks good in VTFT but after programming there was a 'V' (char number 86) on the screen. It seams there is a roll over after char number 127 and the char count start from the beginning. But i don't know how to solve this problem.
Can anybody help me?
I'm using VTFT v3.7.0 with mikroC Pro for AVR on a ATXMEGA128A1
i have the same problem with special character above character 127, but the solution above didn't help me. I have importet the Tahoma font in the resource collection with the character range set to 255 and the 'End Char' of the EVEText was set to 255. I used the 'Ö' character for testing ( char number 214) and all looks good in VTFT but after programming there was a 'V' (char number 86) on the screen. It seams there is a roll over after char number 127 and the char count start from the beginning. But i don't know how to solve this problem.
Can anybody help me?
I'm using VTFT v3.7.0 with mikroC Pro for AVR on a ATXMEGA128A1
- Attachments
-
- screen.png (187.68 KiB) Viewed 7151 times
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: showing special characters
Hi,
I believe that I already answered you on the Support Desk.
Best regards,
Marina
I believe that I already answered you on the Support Desk.
Best regards,
Marina
-
- Posts: 19
- Joined: 14 Jan 2013 11:03
Re: showing special characters
Hello!
It works well to change character range to generate fonts which includes å, ä, ö, ü and others
*** EDIT ***
It works sometimes with small ö and ü, but often it only works with capital Ö and Ü. And when generating larger fonts (for ex. Tahoma or Calibri fontsize 22, range 32-255) many characters in the strings get scrambled, not only å, ä, ö, ü. I need help to figure this one out...anyone?
However, I need to use Chinese in my GUI. When trying to paste a Chinese character into mikroC PRO for dsPIC (in a char array in the code), it directly switches to a '?'. Just by pasting it in there I mean.
What would I need to do to make Chinese characters work in my program? I probably will have to edit the character range, but no idea about min/max there..? Sorry if I'm missing something obvious.. Thanks in advance!
Best regards, Anders
It works well to change character range to generate fonts which includes å, ä, ö, ü and others
*** EDIT ***
It works sometimes with small ö and ü, but often it only works with capital Ö and Ü. And when generating larger fonts (for ex. Tahoma or Calibri fontsize 22, range 32-255) many characters in the strings get scrambled, not only å, ä, ö, ü. I need help to figure this one out...anyone?
However, I need to use Chinese in my GUI. When trying to paste a Chinese character into mikroC PRO for dsPIC (in a char array in the code), it directly switches to a '?'. Just by pasting it in there I mean.
What would I need to do to make Chinese characters work in my program? I probably will have to edit the character range, but no idea about min/max there..? Sorry if I'm missing something obvious.. Thanks in advance!
Best regards, Anders
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: showing special characters
Hi,
Please, take a look at this forum topic:
http://www.mikroe.com/forum/viewtopic.php?f=160&t=56146
and project on LibStock:
http://www.libstock.com/projects/view/7 ... nt-library
There you can find explanation how to use non-ASCII characters in Visual TFT.
Best regards,
Marina
Please, take a look at this forum topic:
http://www.mikroe.com/forum/viewtopic.php?f=160&t=56146
and project on LibStock:
http://www.libstock.com/projects/view/7 ... nt-library
There you can find explanation how to use non-ASCII characters in Visual TFT.
Best regards,
Marina
-
- Posts: 19
- Joined: 14 Jan 2013 11:03
Re: showing special characters
Thank you!
But that doesn't really answer my question about using Chinese characters (my mcu is dsPIC33EP) ?? I know how to, at least I think so, generate fonts with a specific character range etc. I'm doing the following in CP Font Generator:
- setting the range to 32-255 (makes whole character matrix green)
- setting code page to (1250) Central Europe (also tried Latin I, same result)
- setting font to Tahoma regular 16, script Western
- setting output format to Microchip AN1882+
My Windows 7 system locale setting is Swedish (Sweden). Are the above settings incorrect perhaps..?
When I try to use strings which includes å, ä, ö and even ü, that part of the text get scrambled?? And when change font size in CP Font Generator to 10 (and smaller) instead, all characters show up OK. Is this strange or expected result? I need some help here, please... Both regarding Chinese characters and the above problem...thanks!
Best regards, Anders
*** EDIT ***
Now I successfully can use the larger font size 16 (Tahoma), generated for Central Europe. To do this I had to unselect characters (from the green matrix) which I don't need anyway, to reduce the generated size. Now å, ä, ö, ü always look correct in my GUI. So, one problem solved...
I still need help though with the Chinese characters. Anyone?
But that doesn't really answer my question about using Chinese characters (my mcu is dsPIC33EP) ?? I know how to, at least I think so, generate fonts with a specific character range etc. I'm doing the following in CP Font Generator:
- setting the range to 32-255 (makes whole character matrix green)
- setting code page to (1250) Central Europe (also tried Latin I, same result)
- setting font to Tahoma regular 16, script Western
- setting output format to Microchip AN1882+
My Windows 7 system locale setting is Swedish (Sweden). Are the above settings incorrect perhaps..?
When I try to use strings which includes å, ä, ö and even ü, that part of the text get scrambled?? And when change font size in CP Font Generator to 10 (and smaller) instead, all characters show up OK. Is this strange or expected result? I need some help here, please... Both regarding Chinese characters and the above problem...thanks!
Best regards, Anders
*** EDIT ***
Now I successfully can use the larger font size 16 (Tahoma), generated for Central Europe. To do this I had to unselect characters (from the green matrix) which I don't need anyway, to reduce the generated size. Now å, ä, ö, ü always look correct in my GUI. So, one problem solved...
I still need help though with the Chinese characters. Anyone?
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: showing special characters
Hi,
Visual TFT currently, doesn't supports Chinese language,
you can try to use application that aCkO posted from the link that I send you earlier.
Pay attention, CP Font Generator supported the following languages:
Central Europe, Cyrillic, Latin I, Greek, Turkish, Hebrew, Arabic, Baltic, Vietnam and Thai.
Did you changed default system code page (system locale) in Windows Control Panel (to use Chinese)?
Best regards,
Marina
Visual TFT currently, doesn't supports Chinese language,
you can try to use application that aCkO posted from the link that I send you earlier.
Pay attention, CP Font Generator supported the following languages:
Central Europe, Cyrillic, Latin I, Greek, Turkish, Hebrew, Arabic, Baltic, Vietnam and Thai.
Did you changed default system code page (system locale) in Windows Control Panel (to use Chinese)?
Best regards,
Marina
-
- Posts: 19
- Joined: 14 Jan 2013 11:03
Re: showing special characters
Thanks for your reply, I will try more tomorrow!
BR Anders
BR Anders
Re: showing special characters
As Marina already suggested, your system locale must match the selected code page in CP Font Generator. The default code page for Swedish is Windows-1252 (Latin I or Western Script). You have to do that if you want to use Swedish alphabet in the IDE:http://windows.microsoft.com/is-is/wind ... tem-locale.
CP Font Generator is originally designed to provide a workaround for the lack of Unicode support in mE software. It supports SBCS code pages only (Single Byte Character Set), i.e. languages with up to 256 keyboard mapped characters.
Output: To change system locale, follow this tutorial: CP Font Generator is originally designed to provide a workaround for the lack of Unicode support in mE software. It supports SBCS code pages only (Single Byte Character Set), i.e. languages with up to 256 keyboard mapped characters.
That's because the code editor component supports ANSI only (single byte characters). Chinese, Japanese and Korean (collectively named CJK) belong to DBCS code pages (Double Byte Character Set). However, there is a way to use CJK ideographs in VTFT and mE compilers but unfortunately not at design time because of the above mentioned ANSI limitations. I will create an application for that purpose along with complete tutorial as soon as I get some free time. Here's just a preview of the output: Regardsanders_col wrote:However, I need to use Chinese in my GUI. When trying to paste a Chinese character into mikroC PRO for dsPIC (in a char array in the code), it directly switches to a '?'. Just by pasting it in there I mean.
-
- Posts: 19
- Joined: 14 Jan 2013 11:03
Re: showing special characters
Thank you aCkO for the info!
I understand that its a complex time-consuming issue for you. Very interesting to hear that you're working on that project, at least now I have some hope I'm looking forward to hear any progress you make. And thanks for providing CP Font Generator, it's really nice and helped me a lot with å, ä, ö, ü etc.
Best regards, Anders
I understand that its a complex time-consuming issue for you. Very interesting to hear that you're working on that project, at least now I have some hope I'm looking forward to hear any progress you make. And thanks for providing CP Font Generator, it's really nice and helped me a lot with å, ä, ö, ü etc.
Best regards, Anders
-
- Posts: 19
- Joined: 14 Jan 2013 11:03
Re: showing special characters
Hello again!
I managed to redraw the existing characters in CP Font Generator program, to generate Chinese characters/font. The pixels that get drawn are based on a bitmap image (16x16) generated in a small program I wrote. This program also uses the window handle of the form that contains the editable character (in CP Font Gen, I use Spy++ to find the handle). It then can plot all the needed pixels in the Chinese character. For now it's on a character-by-character basis, but since our dsPIC program has quite few text strings in it (ca 30), this is an OK solution for us
Best regards, Anders
I managed to redraw the existing characters in CP Font Generator program, to generate Chinese characters/font. The pixels that get drawn are based on a bitmap image (16x16) generated in a small program I wrote. This program also uses the window handle of the form that contains the editable character (in CP Font Gen, I use Spy++ to find the handle). It then can plot all the needed pixels in the Chinese character. For now it's on a character-by-character basis, but since our dsPIC program has quite few text strings in it (ca 30), this is an OK solution for us
Best regards, Anders
Re: showing special characters
Hi All,
I'm still looking for a solution to use chinese characters in VTFT. If I change the system locale to traditional chinese as recommended above I could input chinese characters in VTFT and could compile the resulting code. But at runtime the application shows no screen. With latin characters (german codepage) it works. So what's wrong?
@aCkO: Did you already had the time to prepare a manual how to use chinese characters in VTFT? I'm sure a lot of people would highly appreciate this.
@ anders_col: Would it be possible to provide the software to generate the chinese font? As you already wrote, it's not a perfect solution, but will work as long as you have to translate only a limited number of characters.
Best regards
Niceday
I'm still looking for a solution to use chinese characters in VTFT. If I change the system locale to traditional chinese as recommended above I could input chinese characters in VTFT and could compile the resulting code. But at runtime the application shows no screen. With latin characters (german codepage) it works. So what's wrong?
@aCkO: Did you already had the time to prepare a manual how to use chinese characters in VTFT? I'm sure a lot of people would highly appreciate this.
@ anders_col: Would it be possible to provide the software to generate the chinese font? As you already wrote, it's not a perfect solution, but will work as long as you have to translate only a limited number of characters.
Best regards
Niceday
Re: showing special characters
That's because German belongs to SBCS (single byte character set) code page. Chinese is DBCS.Niceday wrote:I'm still looking for a solution to use chinese characters in VTFT. If I change the system locale to traditional chinese as recommended above I could input chinese characters in VTFT and could compile the resulting code. But at runtime the application shows no screen. With latin characters (german codepage) it works. So what's wrong?
I made some modifications to CP Font Generator to allow export of Unicode characters. This is just a temporary solution that should get the job done: http://www.mikroe.com/forum/viewtopic.php?f=160&t=58298Niceday wrote: @aCkO: Did you already had the time to prepare a manual how to use chinese characters in VTFT? I'm sure a lot of people would highly appreciate this.
Regards