Author Topic: Unicode ?  (Read 9988 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Unicode ?
« Reply #15 on: September 12, 2018, 11:52:31 pm »
Quote
Moreover, since QB64 claims to be compatible with MicroSoft QB4.5, then it really is and supports unicode.

QB4.5 supported Unicode?  How?  What commands were those?  I coded for years in QB45 and don't remember it having *any* font support at all.  What'd I miss?
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Re: Unicode ?
« Reply #16 on: September 13, 2018, 12:12:10 am »
Latin needed no accents. It came multiple centuries before English, Fifi.

Fortunately, I used to learn both Latin and Grec in school.

My response will be : asinus asinum fricat (translation in english : the jackass rubs the jackass) !

It's a historical evolution that has happened other times too. For example, both Vietnam and Turkey, at the turn of the 20th Century, dropped their alphabets and adopted the Roman alphabet. And in French, at least that one accent, la circonflexe, is beginning to disappear in common usage.

Nope, once again you're wrong. Nor the ^ or the ¨ or the two other accents (grave and aigu) are, fortunately, going to disappear in french. The Académmie Française watches over the grain.

Same thing for both the spanish and all the north european languages with all their specific characters.

That's why we've in europe no less than 19 different keyboards, and I don' even talk about russian, chineze, arabian, hebrew or japaneze.

None of this is "distortion." It's what happens, to facilitate such things as education or global communications. The Internet being just another medium, a recent one, in global communications.

This way is what drives to purported tweeter language that loves Trump such as "T KI TOI?" for "Tu es qui, toi?" or even better "Qui es tu, toi?" LoL.

If this is what education and communication should be in the future for the sole reason of poor computer and communication tool developments, that's a choice explaining why most English speaking people and especialy americans are so globaly uneducated (smile).

Anyway, you take this way too seriously, Fifi. It was meant more in jest.

Do not worry, I understand very well jokes.

My point was only that if QB64 wants to gain a worldwide use and be truly QB 4.5 compatible as it claims to be, it should manage unicode.

Cheers.
Fifi
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Re: Unicode ?
« Reply #17 on: September 13, 2018, 12:25:13 am »
Quote
Moreover, since QB64 claims to be compatible with MicroSoft QB4.5, then it really is and supports unicode.

QB4.5 supported Unicode?  How?  What commands were those?  I coded for years in QB45 and don't remember it having *any* font support at all.  What'd I miss?

Mid in the 80ies, my company used to develop a word processor with QB 4.5, then PDS 7 as well as later with Turbo Basic and initialy called Le texte then renamed Turbo Text and it adapted itself automatically to the character set of the machine without loading any font.

Can QB64 do that ?

Do you want the code (I still have it) to port it to QB64 ?

Then there will be some difficuties since we used some assembly code to speed up some process as well as few peek and poke to manage some keyboard keys.

Kind regards.
Fifi
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Unicode ?
« Reply #18 on: September 13, 2018, 12:35:32 am »
I'd love to see it.  QB45 and Unicode were completely separate entities from my experience.  All the BAS programs from those days, that I remember, use ASCII/ANSI codes.  I'd appreciate learning how you did Unicode back then.  Any small demos are welcome, as well as any longer programs you wish to share for us.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Unicode ?
« Reply #19 on: September 13, 2018, 02:43:55 pm »
That's why we've in europe no less than 19 different keyboards, and I don' even talk about russian, chineze, arabian, hebrew or japaneze.

And you think this is good??? Come now. It's an absurd situation, in this era of global communications.

Japanese is one language that can easily use the Roman alphabet, in fact, because its pronunciation is very clear, very much like Italian. Same goes for other languages, like Greek and Russian. No strange sounds, that the Roman alphabet cannot easily manage. Although at least, Greek and cyrillic alphabets are efficient.

If you have an alphabet consisting of 20-something characters, you can hope for widespread literacy. If you have to learn thousands of characters, I think Chinese has some 40,000 characters, although obviously, very few people know them all, it's a completely different situation.

Same goes for numerals. The world did not stick, stubbornly, with Roman numerals, correct? Arabic numerals were clearly the better idea, and everyone switched to those, in the 14th Century. Thank goodness we didn't have too many people defensively hanging on to Roman numerals.

As to l'Académie Française, it's not exactly a concept that receives universal agreement, to have a body of bureaucrats freeze the evolution of a language. English is one language that has evolved and continues to evolve, over time. That's not a bad thing, by any means. Other languages, such as Italian and German, display much less "high anxiety" when importing new words, than French does. In fact, even French spoken in other countries, such as Belgium, is less anxious about that.

Quote
My point was only that if QB64 wants to gain a worldwide use and be truly QB 4.5 compatible as it claims to be, it should manage unicode.

This goes beyond Basic. In any event, ultimately, it would be very difficult to create programming languages with multilingual commands for everything. Rather than attempt that sort of thing, I'd much rather pick a simple language, even Latin, and go with that universal solution. Some things make more sense than other things, Fifi.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Unicode ?
« Reply #20 on: September 13, 2018, 02:52:35 pm »
Hi Guys

@RhoSigma
Quote
You cannot write a program in your native language, and it will magically work in any other language, even if you exchange the unicode DATAs for the other language. This is, as all hardcoded (literal) strings in your program are still in the encoding of your native language
I agree because this is equal to say that if I make a program that takes infos from OS (enviroment) at the place to have a prefilled hardcoded string  we jump forward the worldwidespreading of that program that like it takes time, date, data of files, folders' tree, can take settings of keyboard and/or language of user.  Think about settings made  in AUTOEXEC.BAT in DOS.

More, I agree that Unicode area is wider of that of each single ASCII table.  We can think of unicode like an ellipse that have into it more little ellipses that are the ASCII tables. So until the ASCII table  is used  as foundamental structure hardcoded in the single program and not loaded from OS  is impossible to have an adaptative program.

Thanks to read
Programming isn't difficult, only it's  consuming time and coffee

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Unicode ?
« Reply #21 on: September 13, 2018, 02:56:44 pm »
I'd love to see it.  QB45 and Unicode were completely separate entities from my experience.  All the BAS programs from those days, that I remember, use ASCII/ANSI codes.  I'd appreciate learning how you did Unicode back then.  Any small demos are welcome, as well as any longer programs you wish to share for us.

Agreed. A far as I know, the only formal release of anything different is a German variant of QuickBasic 4.5 and I think also 7.1. But I don't know exactly what the German version did, that was different.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Unicode ?
« Reply #22 on: September 13, 2018, 03:16:21 pm »
If you guys want 2 interesting facts, try these:

The last version of QuickBASIC was version 4.5 (released 1988)...

The Unicode Consortium was incorporated in California on January 3, 1991,[6] and in October 1991, the first volume of the Unicode standard was published. The second volume, covering Han ideographs, was published in June 1992.....

DAMN!!  Those QB45 developers were AMAZING!!  They supported a language standard that didn't even EXIST when they released their software!  We have to work astonishingly hard to emulate that behavior! 

https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Unicode ?
« Reply #23 on: September 13, 2018, 03:33:21 pm »
For backward compatibility, the IBM ASCII table would still need to be supported. But I suppose it should be a doable do to support Unicode, in the "options" setting? I'm rather unclear how Unicode works, in terms of being able to enter weird characters from any keyboard, as you can do with the IBM ASCII mapping.

Still, we're just talking about entering and outputting text here. Not changing the commands to other languages. I suppose having commands in English may continue to be viewed as "cultural imperialism." :)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Unicode ?
« Reply #24 on: September 13, 2018, 04:08:41 pm »
For backward compatibility, the IBM ASCII table would still need to be supported. But I suppose it should be a doable do to support Unicode, in the "options" setting? I'm rather unclear how Unicode works, in terms of being able to enter weird characters from any keyboard, as you can do with the IBM ASCII mapping.

Still, we're just talking about entering and outputting text here. Not changing the commands to other languages. I suppose having commands in English may continue to be viewed as "cultural imperialism." :)

To be honest, I'm not sure WHY Unicode *isn't* possible.  The basic difference is sending INTEGER values to the print routines instead of BYTE, and there's several internal print statements which would *seem* like they should accept and print those extended values, but I've never managed to convince them to work properly...

For input, if one looks into the source, we find keydown_ascii and keydown_unicode, which would seem as if both are supported internally...

QB64's internal's seem to me as if it's all set to work with Unicode, but I haven't found any way to get them to work properly for me.  Maybe Galleon was intending to add Unicode support at one time, but if so, he didn't bother to relate which flags needed to be set, or what hoops needed to be jumped though, to make it work.   

For those with more free time on their hands than I currently have, I encourage them to look into the source themselves to see what it'd take to put those pieces together to make them work for us.  As it is though, it's beyond my current ability to sort out.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Unicode ?
« Reply #25 on: September 13, 2018, 04:23:58 pm »
Hi
@ Bert

but what is your choice in the poll that I have posted before?

Quote
Ammappete che lingue difficili, Tempo. English is easier, and doesn't need accents.
:-) fine but you can agree that noone of these languages of poll needs accents.

Quote
We already talked about Italian use of accents
....mmmmh... yes we talk but please take this linkhttps://translate.google.it/ and paste these sentences

1.     Io e papà prendiamo il caffè al bar Venezia  --> Io e papa prendiamo il caffè al bar Venezia
2.     ancora sta sul molo --> àncora sta sul molo
3.     pesco sull'albero --> pescò sull'albero
4.     il braccio omero --> il braccio òmero
5.     canto di gioia --> cantò di gioia
6.     pianto con rabbia  --> piantò con rabbia
you can have some fun.

I agree with you that is best to unite than to separate,
 but the lingua franca can be an ideal project for coders and not surely for users...If you write programs for Spanish market you must use text and I/O for spanish, so for English, French, Deutch and Italian and so on.... (Lapalisse teaches us this)

so my poll is to develop an unique programming language that coders can using to code at place to code in the various dialects of PC machine (assembly, Basic, Java, C, C#, C++, Python, Ada, Clipper, Javascript, VBscript, .net, Pascal, Delphi, SmallTalk, Fortran and go here to see almost all languages of programming https://en.wikipedia.org/wiki/List_of_programming_languages)
Do you think that the tool of globalization must lead the transformation to one? :-)
I like this, if you can hear https://www.youtube.com/watch?reload=9&v=-OGd4gplxQM

not surely I think to unite  local I/O of QB64 ->C++   so that I write in code Welcome.BAS
Code: QB64: [Select]
  1. PRINT " Hey Nando, how do you do?"
  2.  
and compiling it you get Commevà.exe and running it  my English user gets on his screen  " Ah Nando, comme và?"
:-)

about
Quote
Not changing the commands to other languages
it was a fantastic idea to build the chaos! I am very grateful that I read the BASIC commands in English, so it is easier for me to consider them as language commands and not to confuse them with the common terms of my native language.
Again with my survey, I can imperatively impose one of the three languages indicated for referendum. Once the choice is made it is also shared.

Have a fun in Romolo Redivivo
Programming isn't difficult, only it's  consuming time and coffee

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Unicode ?
« Reply #26 on: September 13, 2018, 07:57:59 pm »
1.     Io e papà prendiamo il caffè al bar Venezia  --> Io e papa prendiamo il caffè al bar Venezia,

So, context makes it clear. If we were talking about Pope Francis, we would have said "Io e il papa. As to the accent in caffè, I mean, you could make those same arguments for English, no?

For example, the word "even." It is pronounced eevin, but who cares? We could insist that you need accents, especially if the same letter is pronounced in different ways in the same word, but they aren't used at all. Or, c in the word cease is pronounced like an s. In the word coat, it's pronounced like a k. Vabbè, ma si capisce ugualmente.

My contention is, this is more an issue of custom and convention, rather than true necessity.

Quote
2.     ancora sta sul molo --> àncora sta sul molo

If you are talking about an anchor, you'd say "l'ancora sta sul molo."

Quote
3.     pesco sull'albero --> pescò sull'albero

Granted, that's a very good example of when tenses might be confused. But, again, not unique to Italian. In English, I can say "I read (pronounced reed) a book," or you can say "I read (pronounced red) a book." Two different tenses, yet you will not convince anyone to use accents in English. So, it's a matter of abitudini, more than actual necessità. Your other examples were the same tenses problem. (Parenthetically, il passato remoto, or the simple past tense, is not much used anymore in Italian? Perhaps in some dialects it still is, but all of your examples are clarified in more colloquial use. Ha pescato sull'albero, using the past participle instead. Or, if longer ago, you'd probably say, pescava sull'albero.)

Quote
so my poll is to develop an unique programming language that coders can using to code at place to code in the various dialects of PC machine (assembly, Basic, Java, C, C#, C++, Python, Ada, Clipper, Javascript, VBscript, .net, Pascal, Delphi, SmallTalk, Fortran and go here to see almost all languages of programming

I'm not nearly as good a programmer as many on this wonderful forum, having only been schooled in Fortran and Basic (of various dialects). But I am still very impressed at how Galleon managed to create a very credible and robust translator, QuickBasic to C++. Indicating, I would think, that it does make sense to focus down on fewer languages. Functionality must be similar enough, if such good automatic translation is possible.

Quote
I am very grateful that I read the BASIC commands in English, so it is easier for me to consider them as language commands and not to confuse them with the common terms of my native language.

Interesting point! Then this validates my suggestion to make all the commands in Latin. That way, everyone can benefit from the commands being unique to the programming language! :)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Unicode ?
« Reply #27 on: September 13, 2018, 09:36:13 pm »
If we're talking about lack of accents in language, the best example I can think of (in English) is, "base".

Bass is "B-ACE" when used in to talk about music.
Bass is "B-ASS" when used to talk about a fish.

No accent with the word, so we have to infer pronunciation and meaning from context.  If folks can tell the difference with a word like that, they can tell them apart in any other case.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Unicode ?
« Reply #28 on: September 13, 2018, 09:38:05 pm »
If you guys want 2 interesting facts, try these:

The last version of QuickBASIC was version 4.5 (released 1988)...

The Unicode Consortium was incorporated in California on January 3, 1991,[6] and in October 1991, the first volume of the Unicode standard was published. The second volume, covering Han ideographs, was published in June 1992.....

DAMN!!  Those QB45 developers were AMAZING!!  They supported a language standard that didn't even EXIST when they released their software!  We have to work astonishingly hard to emulate that behavior!

Didn't MS DOS keep different ASCII sets depending on country or language of user?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Unicode ?
« Reply #29 on: September 13, 2018, 10:05:07 pm »
If you guys want 2 interesting facts, try these:

The last version of QuickBASIC was version 4.5 (released 1988)...

The Unicode Consortium was incorporated in California on January 3, 1991,[6] and in October 1991, the first volume of the Unicode standard was published. The second volume, covering Han ideographs, was published in June 1992.....

DAMN!!  Those QB45 developers were AMAZING!!  They supported a language standard that didn't even EXIST when they released their software!  We have to work astonishingly hard to emulate that behavior!

Didn't MS DOS keep different ASCII sets depending on country or language of user?

We had various code pages back in those days.  Unicode was basically an attempt to merge all those individual pages into one, and came a bit later.

https://en.m.wikipedia.org/wiki/Code_page
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!