Unicode & UTF-8

Djazair was engineered with first-class internationalization at its very core. Rather than treating strings as raw ASCII byte buffers, Djazair operates on true Unicode code points.

Native Arabic & Emoji Support

In Djazair, Arabic identifiers, multi-byte emojis, Japanese Kanji, and accented letters are valid anywhere: in variable names, function declarations, class properties, and string operations.

Arabic Identifiers & Code Example

You can write complete scripts using Arabic variable and function names:

djazair
# Variables and functions with Arabic and emojis
let 🚀_السرعة = 100

fn 🧑‍💻_حساب_المجموع(أ, ب)
    return أ + ب
end

print("النتيجة: ${🧑‍💻_حساب_المجموع(25, 75)}")
# => النتيجة: 100

Code-Point Accurate Length & Indexing

Consider a mixed string with 1-byte, 2-byte, 3-byte, and 4-byte characters:

djazair
# A (1 byte), م (2 bytes), 漢 (3 bytes), 🚀 (4 bytes)
let complexStr = "Aم漢🚀"

# In many other languages, length returns 10 bytes.
# In Djazair, length() returns the true logical character count:
print(complexStr.length())          # => 4

# Accurate character iteration:
for char in complexStr
    print("${char} => code point: ${char.charCodeAt(0)}")
end
# A => code point: 65
# م => code point: 1605
# 漢 => code point: 28450
# 🚀 => code point: 128640

# Surgical slicing without breaking multi-byte boundaries:
print(complexStr.slice(1, 3))       # => م漢

Arabic Diacritics (التشكيل)

Arabic vowels and diacritical marks (حركات التشكيل) are treated as distinct logical Unicode code points, allowing precise linguistic processing:

djazair
let phrase = "بِسْمِ اللَّهِ"
print("Text: ${phrase}")
print("Character count with diacritics: ${phrase.length()}")