Comments (6)
Yes, you are right, the hamza mechanic chosen (i.e. composition-based) is different from most layouts currently in use. But Unicode strings cannot be compared on the character or even byte level. UTS #10 defines the Unicode Collation Algorithm, which should be used to correctly sort (and compare, which is the same thing) Unicode strings. Step 1.1 explicitly mentions that before doing anything else both strings must be normalized into form D (which stands for decomposed). Thus
>>> 'أحمد' == 'أحمد'
False
>>> unicodedata.normalize('NFD', 'أحمد') == unicodedata.normalize('NFD', 'أحمد')
True
I’m sure most applications don’t do that, because they are only developed with Latin character sets in mind.
Is this explanation clear? Should I add a note about this to the website?
from lulua.
Thanks for the thorough explanation. Yes, a note added to the website would be appreciated.
I wonder if there's a workaround that could be implemented to combine those chars into a decomposed form to add support for those legacy applications, but even that would be difficult to be supported on multiple platforms.
from lulua.
I’ll add a note.
Most platforms know a concept called dead keys. That means multiple key presses produce one output character. It’s used on European keyboards for example for the French acute accent. It works by pressing the acute first and then a letter character, thus ´+a=á. In theory this should also work for combining ٔ and ا into one character.
I’m not a native Arabic speaker/writer, but using this concept would feel very weird to me, because
a) ٔ and ٕ often feel like an optional diacritic, just like short vowels/shadda/…, which are added after the consonant and
b) the layout would have two different concepts for character composition: The Hamza+Alef deadkey variant, which is a “true” composition into one character, plus – the other way around – consonant+short vowel which do not combine into a single character.
What do you think about dead keys? Is it worth it?
from lulua.
Sadly, the dead key solution is probably not good enough because of the order. The hamza being typed first is just not intuitional.
But maybe with some experimenting, it would not be that difficult to adjust to.
The best solution would be to edit the previous character and keeping the input order the same, but it has technical limitations
from lulua.
This is certainly possible with a custom IME, similar to what is used for Asian languages (Korean, Chinese, …). It does not “edit” the previous character though, instead it “buffers” characters and “commits” them (or combined versions thereof) based on certain rules. But I feel it’s total overkill and typing would feel very weird, because we’d have to buffer (that means: defer writing!) every alef, waw and yah, so they can be combined with the following hamza.
In Korean for example every “sound” is combining like this ㅇ+ㅏ+ㅇ=앙 and thus it’s very natural to buffer a character until it’s complete and then write it. (But it has the downside that you cannot modify this combined character afterwards. You need to retype all parts again, if you delete it.)
from lulua.
Yeah, even the IME solution doesn't seem very sound. The current system appears to be the best despite the Unicode comparison issue.
from lulua.
Related Issues (15)
- Translate website/documentation to Arabic
- Explain design decisions
- Cross-compile Windows driver
- Windows physical key layout
- 40% keyboard HOT 2
- Lulua hamza in klavaro HOT 3
- Website colorscheme
- Documentation HOT 1
- ASMO 663
- Diversify corpus data sources
- Rearrange 2nd and 3rd layer HOT 1
- Platform support
- Typing tutor support
- Scientific evaluation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lulua.