Re: utf-16 and glib



On Mon, 2009-01-26 at 23:01 +0100, Martin (OPENGeoMap) wrote:
Maciej Piechotka escribiÃ:
On Mon, 2009-01-26 at 22:49 +0100, Martin (OPENGeoMap) wrote:
  
Maciej Piechotka escribiÃ:
    
On Mon, 2009-01-26 at 22:30 +0100, Martin (OPENGeoMap) wrote:
  
      
hi:
    
        
    
        
            
Well - what do you mean? Having 2 functions - one reciving utf-16 and
one utf-8? To be honest - it doesn't make any sense to me (it would
create much mess, double the code, make programming errors easier...).

Converting? What's wrong with g_utf16_to_utf8?
  
      
          
I was talking about a full utf16 and utf8 api in glib and use a macro to 
work work intermediate string:

For example in windows they have this types:
LPSTR =char *
    
        
char * is used for utf-8 AFAIR

  
      
LPWSTR= utf16windowschar *

    
        
gunichar2

  
      
perhaps in glib we could have utf16 and utf8 in that way or am i wrong?

    
        
I'm not glib developer. As far as the module of operating on utf-16
strings is proposed I'm not against. However I would prefere to not have
2 entries to each function.
  
      
Hi:

What is wrong with:
gchar*  g_utf8_strncpy  (gchar *dest,const gchar *src,gsize n);
    

That's one not needed as strncpy should work.
  
hehe i know but that function it really exist:
http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#g-utf8-strncpy

My error.

Regards


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]