Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
24 user(s) are online (18 user(s) are browsing Forum)

Members: 0
Guests: 24

more...


Browsing this Thread:   1 Anonymous Users






Re: Unicode support in PortablE
#6
Home away from home
Home away from home


See User information
If possible, I'd rather not add both TTEngine AND Scintilla to PortablE, since that potentially means wasted work. However, if you think that at least one of them would likely be acceptable (?), then I'll start looking at both (maybe they will be easy enough that I feel like doing both).

BTW, the "Examples/std/GUI/Amiga/NativeGuiExample.e" example shows how to add existing MUI components to cGUI. There is a "simple" way which is quick'n'dirty (but looks a bit ugly), and there is a "native" way which requires more code initially (but is much nicer to repeatedly use). There is basic documentation here:
http://cshandley.co.uk/portable/StandardFunctionality.html#23_34
and here for the AddNativeSimple() procedure:
http://cshandley.co.uk/portable/StandardFunctionality.html#23_2

Posted on: 2016/2/28 16:20
ChrisH
--
Author of the PortablE programming language.
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Unicode support in PortablE
#5
Quite a regular
Quite a regular


See User information
Need to think about this for a bit and maybe try what is possible with either.
Chinese and Japanese would also be among the characters but the only encoding do deal with would be UTF-8 and Latin-1.


Manfred

Posted on: 2016/2/28 16:02
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Unicode support in PortablE
#4
Home away from home
Home away from home


See User information
PortablE's cGUI supports the insertion of MUI components into it's GUI, so it would (at least in principle) be possible for Scintilla to be used in a cGUI window.

TTEngine would NOT be usable within cGUI... unless a MUI wrapper was created. I *should* be able to do that, since I have some (albiet limited) experience creating MUI custom classes in PortablE.... However the displayed text would NOT have scroll bars (nor be scrollable), i.e. the whole text must be displayed. (edit: Scroll bars might be possible, but I don't have any experience of implementing them.)


Scintilla appears to be MorphOS only (nothing on Aminet or OS4Depot). I think I read that Scintilla uses TTEngine, although I may be mistaken.

TTEngine appears to support MorphOS, AROS & AmigaOS3 (see Aminet). I *presume* the OS3 version could be made to work on AmigaOS4 (compiling for it would require the creation of OS4-specific compiler files, which is probably possible). NOTE that me adding support for multiple OSes requires significantly more work, so initially I may prefer to limit the OSes to those you need immediately.


What do you think would be the best option?

P.S. From your reply, I assume that you want to support the display of characters from outside of the Amiga's current 8-bit Charset (whatever that may be)? e.g. Chinese/Japanese characters.

Posted on: 2016/2/24 9:03

Edited by PortablE on 2016/2/24 9:53:41
Edited by PortablE on 2016/2/24 12:36:16
ChrisH
--
Author of the PortablE programming language.
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Unicode support in PortablE
#3
Quite a regular
Quite a regular


See User information
Hi Chris.

I'm not exactly certain.
I think the Scintilla approach is probably the most simple one to display text.
However I'm not certain if it is sufficient for my needs as I don't exactly know what it can or cannot do.

If possible I wold use PortablE's standard functionality cGUI.

Both Scintilla and TTEngine are MorphOS only, or?


Manfred

Posted on: 2016/2/23 19:56
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Unicode support in PortablE
#2
Home away from home
Home away from home


See User information
Sorry I didn't notice your post until now...

Not yet officially supported... but (completely from scratch) I have implemented my own modules for reading & writing UTF-8 (with the caveat that non-ASCII characters either get converted to something similar in 'ASCII' (8-bit Charset), in a few cases using several characters, or otherwise get mapped to an 'unknown' character ("?" by default)). So stuff like Japanese characters would be completely UNreadable.

Currently these modules are only used by a program I am developing, and are not publically released... but I could see if it is viable to release them...? Since they would still be my personal modules (i.e. in the "CSH" folder), it's possible their interface might change in the future (although likely nothing major).


OTOH, how does MorphOS handle Unicode/UTF-8 conversion? If you only care about targeting MOS, it might make more sense for me to add support for that instead...

edit: It looks like charset.library can convert to/from UTF-8 & 'ASCII' (8-bit Charset of your choosing). I could add support for this library to PortablE, probably fairly easily... BUT I'm not yet sure how you could display non-ASCII characters (such as Japanese).

edit: I see you were asking similar question on MorphZone. Going by that answer, the solution is to use TTEngine if you want to draw UTF-8 text into a plain Intuition window, OR ALTERNATIVELY use Scintilla if you want to display/edit UTF-8 text in a MUI window. I could add support for either of those, probably easily, depending upon what you need.

Posted on: 2016/2/22 9:20

Edited by PortablE on 2016/2/22 9:55:01
Edited by PortablE on 2016/2/22 10:08:46
Edited by PortablE on 2016/2/22 10:13:26
Edited by PortablE on 2016/2/22 10:18:25
Edited by PortablE on 2016/2/22 10:19:12
Edited by PortablE on 2016/2/22 12:49:38
ChrisH
--
Author of the PortablE programming language.
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Unicode support in PortablE
#1
Quite a regular
Quite a regular


See User information
Hi.

Yeah, the subject says it already.
I'd like to know if it is possible to load and display UTF-8 encoded text using PortablE?


Manfred

Posted on: 2016/2/10 19:27
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project