Chars
Doug Webb (190) 1180 posts |
Chris, nothing for you to be sorry about as it should be us users thanking you for updating things and progressing the OS. If we have to give a bit of help testing things then that is better than not having any progress at all so thanks for all your efforts. |
Andrew Conroy (370) 740 posts |
Did you get my email, Rick? (Just checking as Orpheus got blacklisted by Hotmail the other week!) |
Steve Pampling (1551) 8172 posts |
Oh that’s priceless. One of the worlds best spam mail hosts blacklisting anyone. |
Rick Murray (539) 13850 posts |
Yes, I did. Thank you. I downloaded the smaller file, however I needed to shift some animé around to make space for the bigger file and somewhere along the way I got seriously sidetracked with installing adb and USB drivers for my phone so I could lift the Kindle encryption keys so calibre could crack the prc file so I could bash it into an epub so I could put it on my non Kindle ebook device.
Hotmail? Is that still a thing? |
Chris Mahoney (1684) 2165 posts |
Sounds accurate. I’m currently in the middle of stripping DRM from an iTunes purchase so that I can watch it on my big screen (which is connected using DVI and therefore doesn’t support the required HDCP). Apparently in some countries it’s illegal to remove DRM from content that you legally own (why?!) but fortunately I don’t live in one of them! |
Chris Mahoney (1684) 2165 posts |
So… how do you get all this working? I’ve merged today’s Boot into my existing installation and rebooted. If I do *Alphabet UTF8 then I can “type” a single Japanese character into SrcEdit 1.31 (after selecting the same font as in Chars) but any subsequent characters cause the text to go blank. Edit 1.73 has the same behaviour. I can’t “type” anything into Ovation 1.53 in UTF8 mode, and if I don’t use the *Alphabet command in the first place then Chars has all the Japanese characters greyed out. Draw 1.29 appears to work, but no luck with anything else. Is this expected behaviour or am I doing something wrong? I should note that I have not updated the ROM as I’m using low vectors and don’t feel like rebuilding it at this stage. I’m using the Chars app in RO350Hook; the CVS logs seem to indicate that this is the only ROM component that’s changed. |
Rick Murray (539) 13850 posts |
Hmm. Can you tell me what steps you are trying? I’ll take a look at it. . |
Chris (121) 472 posts |
There’s not really much support at all from most apps for UTF8 input yet, so what you’re seeing from Edit and Draw is expected. The addition of a UTF8 capable Chars is intended as an incremental step towards improving that situation, since there’s little incentive to update apps without a readily available way of inputting characters beyond the 8-bit limit. Until more apps (and the Wimp, Filer, etc) are updated to cope with this, the main benefit of the new Chars is really in its aspect as a font viewer – ie being able to at least see what glyphs a font has, even when the desktop Alphabet is (say) Latin1. |
David Pitt (102) 743 posts |
This seems to be a display thing, moving the cursor with the arrow keys can cause the missing characters to reappear.
That seems to be OK here, characters can be entered via !Chars or ALT + the unicode decimal value as given by !Chars. Ovation 1.53RM (14-Feb-2016). |
Paul Sprangers (346) 525 posts |
Now that there’s some progress in UTF8 on RISC OS and people try to enter foreign characters via !Chars or Alt+code, may I point at !KeyMap ? It’s created especially with UTF8 input in mind, which means that you can type your characters directly on the keyboard. It comes with 17 predefined maps already, while it’s quite easy to define your own. There’s a built in virtual keyboard too, which makes mastering you mappings quite a bit easier. However, languages with many characters, such as Chinese, are beyond the scope of the program, unfortunately. I don’t know which kind of Japanese you want to type, but Hiragana or Katakana should be possible, making use of the shift key. If you want me to create the Japanese keymap according to your wishes (which character under which key, I mean), I’d be happy to help. But I must admit that I know nothing about Japanese… |
Rick Murray (539) 13850 posts |
You’ll need two separate key maps, or use some sort of Alt keypress to toggle (this would be preferable as both are used at the same time). Hiragana keyboard mapping here. Google will find you the katakana equivalent (it’s mostly the same, just note that katakana tends to use a prolonged vowel mark rather than a second vowel). Oh, and the things that look like little kana are exactly that. A small tsu is used to devote a doubled consonant (like in “sekki”), as well as some of the less common sounds, like (from memory) “gyo”. Pay attention also to the two keys @ and [ by the Enter key. The thing that looks like a backwards " and the °. These are dead keys to work with certain kana. For example the kana for “to” plus the " outputs a different kana (to with a ") which is read as “do” (like “dough”, not “dew”). Sorry, it’s not particularly simple. :-) |
Rick Murray (539) 13850 posts | |
Paul Sprangers (346) 525 posts |
Dead keys… I feared them already. It’s something that !KeyMap cannot do. And I don’t understand a word of the rest that you explain. It’s like Chinese to me. |
Chris Mahoney (1684) 2165 posts |
I’ll play around with Ovation a bit more now that I know that it “should” work, at least to an extent. As for direct Japanese input, the modern way of doing this is with QWERTY. If you want た then you don’t press a た key but rather type “ta”. The host OS contains a dictionary of words and how to “spell” them, for example it knows that “watashi” is 私 and “gohan” is ご飯. Implementing this sort of thing would be a nightmare so I’ll put up with Chars for now :P |
Chris Mahoney (1684) 2165 posts |
Thanks; that does indeed work.
I’m not sure what I’ve done differently, but it’s working now! :) |
David Pitt (102) 743 posts |
!Chars 2.00 does not respect its saved Choices. The parameters in the save routine are transposed. I have amended that in the disc version in 350Hook and that is now working as expected. Otherwise it is all good as far as I can see. Many Thanks. |
Paul Sprangers (346) 525 posts |
I completely agree that the QWERTY method is the better way. Actually, I think it’s the only way for languages with thousands of characters. But I doubt its efficiency for languages with a limited number of characters. For example, I’ve worked with a Russian QWERTY version, which was actually a pain. You first have to imagine how a particular Russian word could be transcribed (in English!), and then often find out that it can be transcribed in more than one way, only one of which leads to the desired result. Typing the individual Russian characters directly is much easier and faster. However, as the QWERTY approach isn’t available on our system in the first place, I would certainly prefer the direct key way over the rather daunting !Chars input. Since this type of Japanese seems to have a limited set of characters, I think it should be possible to create a key map. |
Rick Murray (539) 13850 posts |
Dead key isn’t too difficult. If the user clicks on a dead key, all you need to do is remember the dead key has been selected. if (NOT deadkey) output regular key code else output alternative key code
Nono, it’s the Kanji that’s like Chinese. :-P As a quick crash course – Japanese has three ways of writing:
The problem is, there are more sounds in Japanese than kana. So to get around this, some symbols and conventions were added. Take a deep breath. This isn’t hard just kind of fiddly. :-) The use of little backwards speech marks (actually called dakuten) modify the sounds in one way, while the use of a little degree symbol (handakuten) modifies the sounds differently. To provide some real examples, the katakana for “to” (said like “toe”) is ト but there is no separate kana for “do” (said like dough). Instead, the little speech marks are added to ト to create ド. To show this in an example, look at the word “プロジェクト”. That is “pu ro je ku to” or project written in Japanese. Without the stuff over the first and third kana, the word would be “フロシクト” which sounds like “fu ro shi ku to” – not at all similar. You’ll notice the little “I”-like kana (fourth one along) has gone too. That is because those little symbols also have a meaning. The combination “ジュ” changes a “ji” sound to a “ju” sound. There are some other things, a look at the Katakana table will illustrate these, however for the purposes of an on-screen keyboard, one only needs to consider the following:
There is a method – using shift on a key with a “big” version of the symbol gives the little version; plus a modifier key for the " and °. There are two more – ヰ/ゐ (wi) and ヱ/ゑ (we). There are obsolete. Bonus marks for including them, but you don’t need to. Okay. Here endeth the lesson. ;-)
This is much more common with non-Japanese than Japanese. A Japanese person is likely to use a keyboard marked out in kana; it makes it possible to write Japanese with about half the keypresses.
Yup. And that’s not even counting for the programming issues of a pop up keyboard controlled list of choices of what the user might have been wanting to enter. For an example, go to Google translate (use a PC!) and switch to Japanese→English. Ensure the little kana symbol down in the bottom left of the input box is selected. Then type in “kokoro” and press Space (not Return). Marvel at the list that pops up. The one at the bottom is ko ko ro (古々路) and it translates to mean “old people road” according to Google. But, hey, those Kanji can be said as kokoro, so maybe the user wanted to write that and not the usual 心 (heart). |
Chris (121) 472 posts |
Thanks David – they do seem to have got swapped over somehow. I’ll send in a fix. Glad it’s otherwise working OK. |
Chris Mahoney (1684) 2165 posts |
I had heard that the younger generation tended to use QWERTY whereas the kana keys were more frequently used by people that have been using computers for a long time (back when it was the only way). However, I don’t live in Japan so I can’t confirm whether this is accurate :) PS. You pick “insomnia” as your katakana example, and I’m on the forums at 4:30 in the morning because of just that… |
Doug Webb (190) 1180 posts |
Chris Has the fix for the Fontlist space not growing been added yet as I can’t see it in the CVS log and the issue is still there with the 16th July ROMS and disc image. I assume that you are waiting on ROOL checking them in? Thanks for the work on the other fix as well. Doug |
Chris (121) 472 posts |
I’ve dropped ROOL a line with the proposed fix, as well as the Choices issue, so hopefully it’s the queue to be looked at :) |
Doug Webb (190) 1180 posts |
Thanks Chris. I’ll look out for it. Doug |
David Pitt (102) 743 posts |
Chars 2.01 has arrived with the 31-Jul-16 beta ROM. Choices are now correct, I don’t have ‘lots of fonts’ so can’t test the memory issue. Many thanks. |
Frederick Bambrough (1372) 837 posts |
Seems to be working fine here with 73 font families. |