RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → Code review →

Chars

Subscribe to Chars 135 posts, 23 voices

Posts per page:

Pages: 1 2 3 4 5 6

 
Jul 13, 2016 12:50pm
Avatar Doug Webb (190) 858 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.

 
Jul 13, 2016 5:56pm
Avatar Andrew Conroy (370) 626 posts

Did you get my email, Rick? (Just checking as Orpheus got blacklisted by Hotmail the other week!)

 
Jul 13, 2016 6:06pm
Avatar Steve Pampling (1551) 6545 posts

Just checking as Orpheus got blacklisted by Hotmail the other week!

Oh that’s priceless. One of the worlds best spam mail hosts blacklisting anyone.

 
Jul 14, 2016 12:26am
Avatar Rick Murray (539) 10579 posts

Did you get my email, Rick?

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.
Something that would be dead easy if they didn’t insist on cocking around with DRM for a €0,89 book! Well, it’s done now. Everything from this point on ought to be draggy-droppy.
I’ll pick up the BIG file tomorrow. It’s a public holiday – yay no work – but what the hell it’s eight degrees out there … went to say goodnight to the cat and felt like I was in a fridge!

(Just checking as Orpheus got blacklisted by Hotmail the other week!)

Hotmail? Is that still a thing?

 
Jul 14, 2016 5:10am
Avatar Chris Mahoney (1684) 1687 posts

Something that would be dead easy if they didn’t insist on cocking around with DRM for a €0,89 book!

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!

 
Jul 15, 2016 9:11am
Avatar Chris Mahoney (1684) 1687 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.

 
Jul 15, 2016 10:00am
Avatar Rick Murray (539) 10579 posts

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.

Hmm. Can you tell me what steps you are trying? I’ll take a look at it. .

 
Jul 15, 2016 10:17am
Avatar Chris (121) 437 posts

Is this expected behaviour or am I doing something wrong?

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.

 
Jul 15, 2016 10:25am
Avatar David Pitt (102) 763 posts

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.

This seems to be a display thing, moving the cursor with the arrow keys can cause the missing characters to reappear.

I can’t “type” anything into Ovation 1.53 in UTF8 mode

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).

 
Jul 15, 2016 11:46am
Avatar Paul Sprangers (346) 192 posts

I can “type” a single Japanese character into SrcEdit

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…

 
Jul 15, 2016 5:37pm
Avatar Rick Murray (539) 10579 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”).
Looking up hiragana / hiragana on wiki will give you a table that demonstrates all of this.

Sorry, it’s not particularly simple. :-)

 
Jul 15, 2016 8:43pm
Avatar Rick Murray (539) 10579 posts

Also… https://www.branah.com/japanese

 
Jul 15, 2016 9:53pm
Avatar Paul Sprangers (346) 192 posts

The thing that looks like a backwards " and the °. These are dead keys to work with certain kana.

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.

 
Jul 15, 2016 11:18pm
Avatar Chris Mahoney (1684) 1687 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

 
Jul 16, 2016 3:57am
Avatar Chris Mahoney (1684) 1687 posts

This seems to be a display thing, moving the cursor with the arrow keys can cause the missing characters to reappear.

Thanks; that does indeed work.

I’ll play around with Ovation a bit more now that I know that it “should” work, at least to an extent.

I’m not sure what I’ve done differently, but it’s working now! :)

 
Jul 16, 2016 7:46am
Avatar David Pitt (102) 763 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.

 
Jul 16, 2016 10:15am
Avatar Paul Sprangers (346) 192 posts

“watashi” is 私 and “gohan” is ご飯. Implementing this sort of thing would be a nightmare so I’ll put up with Chars for now :P

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.

 
Jul 16, 2016 11:11am
Avatar Rick Murray (539) 10579 posts

Dead keys… I feared them already. It’s something that !KeyMap cannot do.

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.
Then, when the user clicks on another key, you look to see if that key offers alternative states. If it does, then the logic is like:

if (NOT deadkey)
   output regular key code
else
   output alternative key code

And I don’t understand a word of the rest that you explain. It’s like Chinese to me.

Nono, it’s the Kanji that’s like Chinese. :-P

As a quick crash course – Japanese has three ways of writing:

  • There is the Chinese-like Kanji, which looks like this “鬼束”. They are of no concern to us due to the complexities of actually being able to enter them into a computer.
  • There is a phonetic syllabary called Hiragana, which looks like this “ちひろ” (curly). This can be used to write Japanese (and often is, by children). It is also used to write names, conjugation, etc. You may also encounter Hiragana alongside Kanji (frequent in some manga) to guide on how some of the more complicated Kanji are pronounced.
  • Then there is the phonetic syllabary called Katakana, which looks like this “インソムニア” (angular). It contains the exact same sounds as Hiragana. It is used for writing “foreign” words (the example is “insomunia” (insomnia)) and also for text that should stand out – the Japanese equivalent of bold text.

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 ド.
There is a pattern to this. All of the ‘k’ kana become ‘g’ kana (ka → ga), ‘s’ become ‘z’, ‘t’ become ‘d’, and ‘h’ become ‘b’ (ha → ba).
The degree symbol is less used. It applies to the ‘h’ kana to create ‘p’ kana.

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:

  • How to add the " symbol (to make ト become ド).
  • How to add the ° symbol (to make フ become プ).
  • How to access the “little symbols” (ャ, ッ etc).

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. ;-)

As for direct Japanese input, the modern way of doing this is with QWERTY.

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.
Still requires an IME to convert こころ to 心, but it is a much faster way to enter text and comes with the benefit of not having to know how to write all of the Japanese sounds in a foreign alphabet.

Implementing this sort of thing would be a nightmare

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).
Japanese is fun like that.

 
Jul 16, 2016 12:50pm
Avatar Chris (121) 437 posts

!Chars 2.00 does not respect its saved Choices. The parameters in the save routine are transposed.

Thanks David – they do seem to have got swapped over somehow. I’ll send in a fix. Glad it’s otherwise working OK.

 
Jul 16, 2016 4:29pm
Avatar Chris Mahoney (1684) 1687 posts

This is much more common with non-Japanese than Japanese. A Japanese person is likely to use a keyboard marked out in kana

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…

 
Jul 19, 2016 3:03pm
Avatar Doug Webb (190) 858 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

 
Jul 19, 2016 4:23pm
Avatar Chris (121) 437 posts

Has the fix for the Fontlist space not growing being added yet

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 :)

 
Jul 19, 2016 4:48pm
Avatar Doug Webb (190) 858 posts

Thanks Chris. I’ll look out for it. Doug

 
Jul 31, 2016 10:04am
Avatar David Pitt (102) 763 posts

I’ll look out for it.

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.

 
Jul 31, 2016 11:17am
Avatar Frederick Bambrough (1372) 708 posts

Seems to be working fine here with 73 font families.

Next page

Pages: 1 2 3 4 5 6

Reply

To post replies, please first log in.

Forums → Code review →

Search forums

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Description

Developer peer review of proposed code alterations.

Voices

  • Doug Webb (190)
  • Andrew Conroy (370)
  • Steve Pampling (1551)
  • Rick Murray (539)
  • Chris Mahoney (1684)
  • Chris (121)
  • David Pitt (102)
  • Paul Sprangers (346)
  • Frederick Bambrough (1372)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys