GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-May-2011, 23:08
ramkumar31 ramkumar31 is offline
New Member
 
Join Date: Apr 2011
Posts: 22
ramkumar31 has a little shameless behaviour in the past
Thumbs up

Problem in unicode while using FLTK


CPP / C++ / C Code:
int mainscreen()
{
       unsigned  base=(unsigned)3255;
       char buff[20],*buf;
       char *p;
       buf=(char *)malloc(5);
       memset(buf,0,5);
       memset(buff,0,20);
       p=buff;
       utf8encode(base,p);
       printf("base value is %u\n",base);
       printf("buffer value is%s\n",buff);
       sprintf(buf,"%s",buff);
       printf("the buf is value %s\n",buf);
       first = new fltk::Group(0, 0, 240, 320, "Main Frame");
       first->set_vertical();
       first->begin();
       {
    	   fltk::Input *n=new Input(40,100,100,30,buf);
         }



}

Hi

In the above code i am facing some problem, using base of the address i get the exact character of the kannada font but while i am using fltk to show the single character it show jung value in screen. what is the problem in code or any changes is required.
Last edited by LuciWiz : 12-May-2011 at 02:21. Reason: Please insert your C++ code between [cpp] & [/cpp] tags
  #2  
Old 12-May-2011, 02:06
MatthiasWM MatthiasWM is offline
VIP
 
Join Date: Nov 2004
Posts: 148
MatthiasWM will become famous soon enough

Re: Problem in unicode while using flkt


I can't help you with FLTK2. Maybe the fltk mailing list at fltk.org has a developer who know more about this.
  #3  
Old 11-Oct-2017, 01:04
denkami denkami is offline
New Member
 
Join Date: Oct 2017
Location: Seoul, South Korea
Posts: 6
denkami is on a distinguished road

Re: Problem in unicode while using FLTK


Dear, you may understand wide character ( wchar_t ) and UTF-8 encoding.
FLTK using UTF-8, and you need converting wide character ( calls unicode in Windows, and I think it's wrong ) to UTF-8 via fl_utf* APIs.
  #4  
Old 11-Oct-2017, 01:06
denkami denkami is offline
New Member
 
Join Date: Oct 2017
Location: Seoul, South Korea
Posts: 6
denkami is on a distinguished road

Re: Problem in unicode while using FLTK


Quote:
Originally Posted by denkami
Dear, you may understand wide character ( wchar_t ) and UTF-8 encoding.
FLTK using UTF-8, and you need converting wide character ( calls unicode in Windows, and I think it's wrong ) to UTF-8 via fl_utf* APIs.

Plus, You need write your code in UTF-8 encoding.
If you are writing code in Windows, check your editor supports write UTF-8 encoding, or try to use NotePad++ to converting your previous code to UTF-8 (with BOM, for asian characters, specially for M$VC).
You can see it should works in just write code and your words with basic string.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ge-Force FX 5600 XT 128 DDR Ultra/760 Problem Crazyfist Computer Hardware Forum 3 07-Jun-2004 19:15
GeForce FX 5600XT Problem too!!! 2funky Computer Hardware Forum 1 11-May-2004 05:25
Another FX 5600 problem (but with details that might shed light on this) BobDaDuck Computer Hardware Forum 2 16-Apr-2004 07:53
Graphics Card Problem......... Robs Computer Hardware Forum 1 29-Feb-2004 10:45

Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:20.


vBulletin, Copyright © 2000 - 2017, Jelsoft Enterprises Ltd.