Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-07

Array with char index could not compile

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Пётр Косаревский
to Alexander Todorov: I have troubles with compiling array with char index that uses cyrillic characters.…
I have troubles with compiling array with char index that uses cyrillic characters.

As you use unicode, you could index it from 0 to 10FFFF and access like my_array[char_to_code(char_itself_or_string_or_array_to_take_char_from_the_beginning)].

If I get it right, widechar is word, char is byte, and everything else is fiction (id est: may misguide).

I personally use dynamic arrays of byte/word/longword to store utf-8/utf-16/utf-32 strings and count characters in them (or check if they are legitimate unicode strings) with self-written functions.

Reply by email