Re: Small feature request for future EU versions

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:

[snip]

> > I have downloaded yours library, it works for me, thanks.

> You are welcome.

Thanks.

> > But it seems to me, your function can not make the *selective*
> > conversion of bilingual texts of the same code page,
> > but of different alphabets.

> I'm sorry but I don't understand what you are saying. What does
> "*selective* conversion" mean?=20

> I think by "bilingual texts of the same code page, but of different
> alphabets." you mean some text in which there is a mixture of characters
> from different alphabets, but each character is still from the same code
> page.

Yes, you are right.

To be more specific and clear, let us take the concrete example,
how my case_ru() function works.

It gets 3 parameters, say:

text = case_ru(1, text, "win")

1 - upper, 0 - lower.
text - sequence with the text I want to process.

"win" - one of 5 options - "dos", "iso", "koi", "mac".
It means the code page of the text sequence.
"win" stands for Windows 1251 common Cyrillic code page.
User has to know what is the text's code page.
It is not a current machine code page, but a concrete
text's code page.

So, this function only processes Russian alphabet on
common Cyrillic code page and doesn't affect the specific
letters, say, Ukrainian, in bilingual Russian/Ukrainian texts.

Same for "dos", "iso", "koi", "mac" Cyrillic code pages.

This way I can use my case_ru() function on any Euphoria platform
to process Russian texts of any other Euphoria platform.
It is really generic for Euphoria platforms, can to process
any given Russian text and doesn't depend on current platform.

So, the case_ua() function, if someone wants to have it,
may use the full Ukrainian alphabet with all common
Russian/Ukrainian letters, or just a few specific Ukrainian
letters to process only these letters in a bilingual
(Russian/Ukrainian) Cyrillic texts on any Euphoria platform.

> I believe my functions can handle that. Something like
>  "Outside window = fen=EAtre ext=E9rieur: gar=E7on = boy"
> should come out from Obj_upper() as=20
>  "OUTSIDE WINDOW = FEN=CATRE EXT=C9RIEUR: GAR=C7ON = BOY"
> So long as each character has a unique code point in the code page,
> regardless of its language, my functions can help.

Are you saying your function processes all alphabets of
given code page at once? Yes, as far as I can see.

If so, it can not process Win_Western texts selectively
on default and requires some *additional* job of local
programmer.

Same as that my case_mj() function, but which is selective
on default, if you want to prepare and use it that way.

The only productive way to get these functions very
useful - to force the local programmers to make functions
for their native alphabets, code pages and languages, I think.

> > Say, I can run my stuff the following way:
> >=20
> > }}}
<eucode>
> > text = case_la(Lo, text)        -- to get all pure Latin letters
lower-case
> > text = case_ru(Lo, text, "win") -- to get all common Russian/Ukrainia=
n
> > letters lower-case
> > text = case_ua(Up, text, "win") -- to get all pure Ukrainian letters
> > upper-case
> > </eucode>
{{{

>
> Couldn't you?

> No, because I don't know those alphabets. However, you could using my
> functions. Use the SetCase procedure to define the mappings for those
> alphabets. Something like ...

> SetCase( "абвгд...эюя",
> "АБВГД . . . ЭЮЯ", -1)

> and then use the Windows Cyrillic code page to get the correct display=

> glyphs.

OK, I do uderstand correctly, I think.
If a user of your function wants to process his text selectively
and not affect the letters of some second possible language of given
code page, he/she has to make some different tables for the SetCase()
function and call it twice.
Firstly for first language, then, after first pass, for the second one.
Right?

But what the strange hex codes/unicodes are in your example above?
It seems to me, the SetCase() function doesn't handles these codes yet,
and it is some reserve for future.

Regards,
Igor Kachan
kinz at peterlink.ru

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu