Re: Raw input of non latin characters
- From: Waldek Hebisch <hebisch@xxxxxxxxxxxxxxxx>
- Date: Tue, 6 Nov 2007 20:34:39 +0000 (UTC)
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
.
- Follow-Ups:
- Re: Raw input of non latin characters
- From: paxel
- Re: Raw input of non latin characters
- References:
- Raw input of non latin characters
- From: paxel
- Raw input of non latin characters
- Prev by Date: Re: Raw input of non latin characters
- Next by Date: Re: Raw input of non latin characters
- Previous by thread: Re: Raw input of non latin characters
- Next by thread: Re: Raw input of non latin characters
- Index(es):
Relevant Pages
|
Loading