Re: Raw input of non latin characters



paxel@xxxxxxxxxxx wrote:
Hello

Iam trying to develop a program on poplog and i need to type russian
characters in ReadLine()
procedure and others like input lines in rclib, window titles etc.
also in string variables in xved or ved.

How i can fix it? Or how i can tune the locale of my linux to do that.
Or where i must make changes in poplog source code to include Locale
support.


Poplog characters internally are just bytes -- Poplog has hardcoded
knowledge about ASCII charaters, but otherwise do not assume any
specific encoding. Hence, simple things should just work but
if you want do something special you need to explicitely program it.

Concerning 'readline': 'readline' must know which characters should
be part of words. You can use 'item_chartype' to inform Poplog
that you want Russian charactes as parts of words. The exact
code depends on your encoding (do you use UTF-8 or one of the
Russian 8-bit encodings?).

For Polish I use code like this:

procedure();
lvars i;
for i from 1 to 18 do
1 -> item_chartype('............'(i));
;;; ^^^^^^^^^^^^
;;; string containing all Polish letters
endfor;
endprocedure();


Poplog string variables should work fine with Russian letters,
however, ved when readind/writing text uses non-ASCII characters
for its own purpose -- tell us what routines cause you problems
and we will look for alternatives.

Concerning windows titles: I have never tried to use Polish letters
in windows title, but in general the technique I used was to
convince an application to use Polish font. More precisely,
programs were thinking that they use western (ISO-8859-1) encoding
but the font contained Polish letters instead of western ones.
AFAIK the same method may be used to display Russian characters.

--
Waldek Hebisch
hebisch@xxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: Raw input of non latin characters
    ... Iam trying to develop a program on poplog and i need to type russian ... also in string variables in xved or ved. ... Poplog uses only 8 bit characters in its words and strings. ...
    (comp.lang.pop)
  • Re: Spaced-out Unicode Cyrillic text
    ... when I open it in Safari, the Russian title has the extra spaces. ... there are extra characters in there. ... The funny thing is that most of the Mac apps obviously get the UTF-8 part ... The rendering routines could be decoding the ...
    (comp.sys.mac.apps)
  • Re: A python IDE for teaching that supports cyrillic i/o
    ... Have you tried to use cyrillic characters in a Python string in ... That works for me in Win XP English, with Russian locale and Russian ... Set Russian locale and Russian language for non-unicode programs on ...
    (comp.lang.python)
  • RE: Unicode in CSV files
    ... Why then do I have no problem saving and opening .xls files with both Russian ... When you use excel the Russian letters are treated as special characters ... They don't map to the the ascii character windows unless your ... then you will have the same problem if you use English. ...
    (microsoft.public.excel.misc)
  • Russian to Windows-1252 (htmlencode)
    ... I am looking for a way to convert Russian characters to their ... html entities in a Windows-1252 character set. ... Unicode::Lite has a strange output (I don't understand it, ...
    (comp.lang.perl.misc)

Loading