Re: EuGTK and UTF-8

new topic     » goto parent     » topic index » view thread      » older message » newer message
EUWX said...
jimcbrown said...
EUWX said...

Whenever i come accross Unicode and utf-8, theorizing seems to be the order of day. Outside of simple nice text under utw-8 in the net like this:
"जैसा ये लिखा है",
a major part of it is vapourware.

Again, I shall point you to http://www.gtk.org/api/2.6/glib/glib-Unicode-Manipulation.html

The question is not whether GTK or Glib can do something. Can EUGTK do something? - that is the question.

I can caterogrically state that using EUGTK, as is currently done in Euphoria, you cannot do extraction, rotation of characters cutting down of strings, etc. You need to write more code and more wrappers, or use anotherpiece of software to do that.

That's a good point. I haven't tried the latest version of EuGTK, so I don't know if that has been added since.

EUWX said...

When I talked about 2000-2003; that was the time when people were changing over from Win 98 with its codepages to real 16 bit Unicode. There are countless examples of presumption of real Unicode, when actually it was just codepage or specific font related solution.

But - I didn't use 98 at that time. I was already on UTF-8 supporting Linux/GNU. I don't see what any of that has to do with me.

EUWX said...

Kindly remember that when I talk about programming I am NOT talking about C or C plusplus; I am talking about application development languages. Most application development programmers are vaguely familiar with C plusplus, and cannot use it, but like me, are comfortable with BASIC and EUPHORIA. Even there, we would rather work with fully integrated GUI tools in the language. For world audience we would like fully developed language that can do string manipulation in Unicode, and a search compatible with syllabic languages. That is why, incidentally Hadoop is taking off in database work, because they fundamentally store a data field as a number of bytes in multiples of 4 bytes - which by the way, is the storage method of Euphoria, but not developed enough to reach those levels.

I am concerned that your attitude is always that of defending the existing rather than looking at the weaknesses and wanting to address these weaknesses, or of recognising the need for progress. The fact that I have rejected Freebasic, QB4, Python Schema, etc in favour of Euphoria is because of the strengths of Euphoria, but that does not mean I should ignore or attempt to hide the weaknesses under the hood of a big C

You are absolutely right. To that end, I've wrapped the Glib functions for the ucs4/utf8 conversions.

This wrapper can be used independently, but it goes well with EuGTK.

The wrapper is available here: http://openeuphoria.org/pastey/177.wc

A modified test7.ex (SLE demo) that uses the new wrapper (call it gunicode.e ) is here: http://openeuphoria.org/pastey/178.wc

The modified demo grabs a substring of the unicode test pasted in and displays just that part when you hit the Quit button.

This took, half an hour? If no one has wrapped it before, I'd guess that this is because no one has needed it before. Not that we shouldn't have this - now I can confidently say that a coder writing only in Euphoria code (and using the right wrappers of course) can do Unicode manipulation as well as simply inputting and displaying Unicode text.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu