Chars
Paul Dunnington (2223) 5 posts |
I have found strange error messages / crashes when trying to test SWI’s from Basic using ;flags%. |
Paul Dunnington (2223) 5 posts |
Looks like my first post is in the wrong place, sorry about that. |
Martin Avison (27) 1491 posts |
I know of no problems matching your (rather vague) description which could affect Basic returning flags from SWIs – they are used all the time! I suggest you create a minimalist program to illustrate your problem, and post details in a NEW thread. |
Paul Dunnington (2223) 5 posts |
Thanks for the reply, Martin. It took me long enough to find out how to post a reply! I don’t know how to start a new thread. SORRY. |
Steve Pampling (1551) 8155 posts |
Select Forums, select specific forum, click “New Topic” link in the top left of the thread list page. |
Paul Dunnington (2223) 5 posts |
Thank you Steve. Got that. |
Rick Murray (539) 13806 posts |
Chris – I was looking to see if I could find a Unicode capable character picker (useful for examining fonts as well) and found this thread. Did you ever finish your !Chars update? The screenshot you posted (here) looks interesting! |
Chris (121) 472 posts |
Hi Rick. Yes, I did finish it, and have sent it to ROOL to evaluate. I’d be happy to send you a copy in the meantime – do you have an email address I could use? |
Rick Murray (539) 13806 posts |
Thanks, I look forward to it. heyrick (one) (nine) (seven) (three) (at) yahoo (dot) co (dot) uk |
Paul Sprangers (346) 523 posts |
Er… could you send one to paul (at) sprie (dot) nl as well? |
Steve Pampling (1551) 8155 posts |
Perhaps ROOL could make it available? |
Chris (121) 472 posts |
Apologies for the threadomancy, but the eagle-eyed will have spotted that a new version of Chars is finally in CVS. Thanks very much to ROOL for their patience in getting this ready for release (and to Jeffrey Lee and Rick Murray for their help). I’d be interested in any feedback on this. There are no doubt some desirable improvements that could be made – such as a scalable display, etc – but in the first instance it’d be good to squash any bugs that people come across. If you’re using RISC OS 5, then Draw is a decent test-bed for inserting Unicode characters (though you can’t edit the string as you type, since it doesn’t know about moving the caret by more than one byte through the string). Or there’s Rick’s version of Ovation which can handle Unicode too. If you want to try out a font with thousands of characters, then Cyberbit is a free choice; download it here. You’ll need to use a convertor such as TTF2f before you can install and use the font with Chars. Obviously you’ll need to be using a UTF8 alphabet to make full use of the new input facilities. Enter: *Alphabet UTF8in a taskwindow, which apart from making a mess of menu text works perfectly well. Finally, I’d appreciate any feedback from linguists on the Categories that Chars uses for different language-based character sets. It’s very easy to modify these, so let me know if there are any issues with the current set. |
Frederick Bambrough (1372) 837 posts |
On my Beagleboard -xM trying to start Chars (09/07) generates the error: ‘No room for this DIM at line 1475’. The disc image has been updated today. |
Chris (121) 472 posts |
Can you try this: open up your Apps directory from the iconbar, and Shift-double-click on the !Chars icon. Copy the !Run file somewhere on to your hard drive, and alter the line that reads
to something a bit bigger (say, 32k). If you then double-click on the !Run file, does that enable !Chars to run? |
Frederick Bambrough (1372) 837 posts |
32k fails, at 48k it runs OK. |
Frederick Bambrough (1372) 837 posts |
… except after a reboot, 32k works too. |
Rick Murray (539) 13806 posts |
Which works as expected in UTF-8 mode (and handles cursor positioning correctly ;) ), but can also be made to work in non-UTF-8 mode. Because, let’s face it, there’s little chance that RISC OS as a whole is going to transition to UTF-8, so it’s simpler to expect Unicode aware applications to work with Unicode regardless of what the system “alphabet” happens to be. Hence my little override hack. Which, by the way, would be very desirable in a proper release – to bring the entire character set repertoire to applications without farting around changing alphabet which could have non-obvious side effects to those using internationalised software such as French. Here’s ISO 8859/1 French as seen on UTF-8: And here’s UTF-8 French as seen on standard Latin1: It’s not an easy situation, is it? ;-) |
Paul Sprangers (346) 523 posts |
There’s another program that can handle Unicode: the good old !Edit. Both lines (the latter is the russian translation) are entered with !KeyMap Editing is a bit of a pain, though. Especially when trying to change something. |
Doug Webb (190) 1158 posts |
Hi Chris & Frederick I can confirm the same No room error and changing the !Run file to 32k for the wimpslot cures the issue. Pandaboard ES with 10th July ROM and Hard Disc image. |
Rick Murray (539) 13806 posts |
That’s not Edit, that’s the font manager interpreting the UTF-8 data. I would say that to “handle Unicode”, it should fulfil two criteria:
|
Paul Sprangers (346) 523 posts |
Well, that’s correct. But !Edit can at least be configured to expect UTF-8 data, where other editors display the usual gobbledygook. And it does show the correct UTF8 characters irrespective of the system alphabet. However, it fails deplorably in placing or moving the caret correctly. A lot of work is to be done, indeed. |
Chris (121) 472 posts |
Thanks. Odd – I can’t reproduce that here. I’m running the IOMD ROM, but I’m not sure what would make the difference. Once you’ve got Chars running, does it perform as expected (ie bring up the UCS character names when the mouse is over them, when in the UTF8 encoding)? And do you have anything non-standard in your setup? I’m not sure if I can think of anything here, except perhaps a very funky desktop font or something. It may be that the wimpslot in the ROM build is simply too small, but it would be nice to know why it doesn’t work for you but does here. |
Sprow (202) 1155 posts |
I believe Edit was used in developing the Unicode Font Manager. There are 2 tiny bits of evidence left in the sources (search “ifdef UNICODE” and “UCS”). As people have noted, the cunning design of the Font Manager means that in general you get Unicode display support for free. The hard part is entering and editing text when 1 character on the screen may be several bytes in memory. There’s also a convention of putting a special byte sequence at the start of flat text files so the editor knows it’s really UTF8 rather than something else which !Edit should follow, and the headache of how you would go about copy & pasting between two applications where one of them was in one mode and the other not. I guess that’s why having the default alphabet be UTF8 is the sensible way to go. |
Rick Murray (539) 13806 posts |
It is easy to scan through the file and determine if it is or is not UTF-8 by looking at the character sequences. The only ambiguity is if there are no high bit set characters.
That instantly breaks anything written for any non-English western language. Really, an app should tell the Wimp that it is UTF-8 and the Wimp deals with that, and the alphabet stuff is an anachronism that has no scope beyond the command line… |
Doug Webb (190) 1158 posts |
Chris, If I change the encoding to UTF8 and then hover over the name I do get the name for example Capital A in Homerton.medium Encoding UTF8 and category Latin is: U+0041 Latin Capital Letter A (AltA+65A) Alos just got another error when doing multiple changes between UTF8 and Latin 1 encodings of : To many nested structures at line 915 I do normally have EasyFont installed at boot but have tried it without and still get the No Room error unless I change the wimpslot to 32K. |