I/O and text representation in gtk+ 1.3.x



Hi,

Thanks for the answers to my question regarding gettext and UTF-8 switching
of gtk+. Now I understand that the plan is to convert all the .po files to
UTF-8. This sounds good.

Now I want to ask again about file and other I/O operation in general.

As it is probably much more difficult to convert all IO stream data to UTF-8
than in .po case, we have to still perform encoding convertion in gtk+, 
either in gtk+ itself or in each single application, when getting text
contents through an input stream to display on a widget, or when writing text
buffer of a widget into an output stream.

I think the way to do code converstion is pretty samely done in I/O.

For example, file open and save will be:
 open
 	- get filename
 	- get a file encoding somehow
 	- g_convert file contents to UTF-8 and display
 save
 	- get filename
 	- get a file encoding somehow
 	- g_convert text buffer of UTF-8 to the file encoding
 	- write to the file

How about handling code convertion to regular gtk+ widgets such as
gtkfileselbox? Just having encoding selection would be fairly simple.

-toshi


    















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