QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Fifi on September 11, 2018, 07:18:09 pm

Title: Unicode ?
Post by: Fifi on September 11, 2018, 07:18:09 pm
Hi all,

One thing that really hampers the use of QB64 is that it is limited to use the basic unaccented ASCII table.

As a result, it prohibits its correct use for languages ​​other than English and similarly limits the use of InForm when it's needed to use different set of characters such as like the french specific set : "à â ä é è ê ë ô ö ù û ü î ï ç" (same problem with many other tongues such as german, spanish, sweden, etc.).

So, is there a plan to change that soon?

Thank you.
Fifi
Title: Re: Unicode ?
Post by: Petr on September 12, 2018, 09:44:37 am
Hi. Use _MAPUNICODE statement for use unicode characters.

Code: QB64: [Select]
  1. cj 'set ASCII to Czech unicode
  2. _FONT _LOADFONT("cyberbit.ttf", 40, "MONOSPACE")
  3. PRINT "Zdravím tě v českém jazyce!"
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. SUB cj '                                                                                      Sub make Czech characters readable correctly on the screen. If you needed use this
  17.     '                                                                                         for other language, is possible, you needed others DATA block. Data blocks are
  18.     RESTORE Microsoft_windows_cp1250 '                                                       for more languages in QB64 help (Shift + F1 / Alphabetical index / _MAPUNICODE statement /
  19.     '                                                                                         Code Pages)
  20.     FOR ASCIIcode = 128 TO 255 '                                              
  21.         '                                                                                    
  22.         READ unicode '                                                                
  23.         '                                                                                    
  24.         _MAPUNICODE unicode TO ASCIIcode '                            
  25.  
  26.     NEXT
  27.  
  28.  
  29.  
  30.     EXIT SUB
  31.  
  32.  
  33.  
  34.  
  35.     Microsoft_windows_cp1250:
  36.     DATA 8364,0,8218,0,8222,8230,8224,8225,0,8240,352,8249,346,356,381,377
  37.     DATA 0,8216,8217,8220,8221,8226,8211,8212,0,8482,353,8250,347,357,382,378
  38.     DATA 160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379
  39.     DATA 176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380
  40.     DATA 340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270
  41.     DATA 272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223
  42.     DATA 341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271
  43.     DATA 273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729
  44.  
  45.  
  46.  

more DATA blocks are in ide help for more languages. Search MAPUNICODE and then Code pages
Title: Re: Unicode ?
Post by: FellippeHeitor on September 12, 2018, 09:54:38 am
So, is there a plan to change that soon?

It involves some deep C++ tweaking which is not my area. With the other team member actively contributing to the code base being Luke, and with his current busy college routine, don't expect it soon.

InForm has an option in the Edit menu to toggle the code page for a generated form. That may be useful to you to some extent. My programs in Portuguese (none ever shared here, as they're used for work) are all InForm-based and all display/accept characters with diacritic marks.
Title: Re: Unicode ?
Post by: Petr on September 12, 2018, 10:02:21 am
Here is way for all for using this with "autodetection" for worldwide programs:

1) use PowerShell for determine your locale setting with

Code: QB64: [Select]
  1. SHELL "powershell get-culture > kbd.txt"
  2.  

2) Read kbd.txt and now you know which language is used
3) now use correct unicode DATAs...
Title: Re: Unicode ?
Post by: TempodiBasic on September 12, 2018, 03:48:02 pm
Hi Guys

about unicode
we must make difference between two issue...

1) Unicode in IDEQB64
2) Unicode in Program compiled by QB64 (and its C++ translation)

I don't know about what of these Fifi has started to talk.

1) In my point of view if I try to set Option Ide using Language... setting on my country windows_CP1252 as you can see here
https://en.wikipedia.org/wiki/Character_encoding (https://en.wikipedia.org/wiki/Character_encoding)
I get the result that you can see in attachment 1 about QB64ide but it let me write my native language characters...
but why if I emulate Qbasic in Dosbox I have no problem about these characters?


2) also using this setting in IDE of QB64, it lasts the issues about I/O from keyboard and file... I think that the issue is How QB64 IDE and instructions manage information about these codes... in fact as you can see in attachment 2  output on screen is a failure and also the input from keyboard and the file... BUT if you see into file.txt created by program but opened by Notepad.exe you can find the right characters.... so the issue is between QB64 inner structure and OS structure!

Thanks to read...
Title: Re: Unicode ?
Post by: TempodiBasic on September 12, 2018, 03:52:40 pm
@Petr
using your command in SHELL
Quote
Here is way for all for using this with "autodetection" for worldwide programs:
I get LCID 1040 it-IT

Where can I find 1040 DATAs?
Google gives me so many unuseful links with no table, while if I search on web cp1252  (windows western europe) I get  table with hex value, can I use them directly as DATA or I must convert in decimal?

Thanks
Title: Re: Unicode ?
Post by: Petr on September 12, 2018, 04:41:01 pm
Hi, for me it return 1029, CZ. I talk about "CZ" or "IT". I use unicode 1250, what is 1029 or your 1040 i dont know.

Your cp 1252 table is this


Microsoft_windows_cp1252:
DATA 8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0
DATA 0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376
DATA 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175
DATA 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191
DATA 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207
DATA 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
DATA 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239
DATA 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255

Code Table 1252 http://en.wikipedia.org/wiki/Windows-1252

                               MS DOS ASC code page differences

                  "ä" is &H84 in CP437, &HE4 in Windows-1252, &HE4 in Unicode.
                  "ö" is &H94 in CP437, &HF6 in Windows-1252, &HF6 in Unicode.

                  "Ă·" is &HF6 in CP437, &HF7 in Windows-1252, &HF7 in Unicode.
                  "ÎŁ" is &HE4 in CP437,                     , &H3A3 in Unicode. 

delete my block data and use this and write here if it works. I copy it from QB64 help.
Title: Re: Unicode ?
Post by: Bert22306 on September 12, 2018, 05:19:49 pm
Fifi, if you can do what Petr suggests, maybe that's your best approach.

Otherwise, for languages like French, Italian, Spanish, and even German to an extent, you can also get by very well, with the default CP437 mapping. For these languages, even German if you ignore the scharfes s (a single character to indicate "ss," which one can also write tout simplement "ss"), then the mapping of characters above 127 is shown here:

https://en.wikipedia.org/wiki/Code_page_437

Scroll down that page, to the table. For the characters above 127, you press <alt> and type the character number from the keypad. For example, <alt>130 is é (e avec accent aigue).

These accented characters show up just fine in the IDE set to the default CP437 and in the QB64 print statements. BUT, if you write the output to a text file, you won't get them to display correctly in Notepad. Notepad assumes Unicode. They will display correctly in MS Word, if, when prompted (open the text file, Word says "encoded text"), you choose MS-DOS.

Seems more cumbersome than it should be, however this approach works with no changes to the default CP437. At least, for the main West Euro languages. Even Portuguese?
Title: Re: Unicode ?
Post by: TempodiBasic on September 12, 2018, 05:26:03 pm
Hi Petr

Thanks

1.
Yes I can confirm that using a new font and remapping it with _MAPUNICODE using the right set of characters You solve my issue 2: function about instructions INPUT and PRINT from keyboard and file of txt
Now I must remember to use a new font and remapping in the initialization of all my programs and they can talk italian...
It is simple and fast! Thanks
in the future we can find also how to set inner font of QB64 for local language. Maybe.

2.
You have a more powerful of Help in QB64IDE than mine!
I must go further to Alphabetical to get tables for languages. :-)
Title: Re: Unicode ?
Post by: RhoSigma on September 12, 2018, 05:28:20 pm
All this is specific for just one language, it is hopeless to make any international reliable programs with QB64. You can switch the IDE to use your native language, but only if you also set a unicode custom font. You can make your program using your native laguage with _MAPUNICODE, but again only with a suitable font set.

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, doesn't matter to what other language you change with _MAPUNICODE. The only way this would work, all hardcoded strings must be saved as actually full Unicode letters internally in a QB64 program, than you could use _MAPUNICODE to map that "internal" Unicode to the one or other country's ASCII code by using the correct DATA table. As long as hardcoded strings are always saved as just ASCII encoded with the language the IDE is set to, you will never reach your expacted goal.

From that point _MAPUNICODE is almost useless, you can use it to make your own language working, but that's it.
Title: Re: Unicode ?
Post by: Bert22306 on September 12, 2018, 05:40:03 pm
RhoSigma has a good point, which is not limited to just the use of special characters, though. Ultimately, we need a lingua franca. For the characters problem, we should all use either English or Latin. Problem solved. :)
Title: Re: Unicode ?
Post by: TempodiBasic on September 12, 2018, 06:04:54 pm
Hi Bert
I have my opinion about what lingua franca is the best....
please all people that are interested to this issue vote choosing among A-B-C

a) https://www.google.it/search?q=Geroglifici+egizi&stick=H4sIAAAAAAAAAONgFuLUz9U3MKwyKctT4gAxU9LKDLX4nPNzc_PzgjNTUssTK4sBY47ZuScAAAA&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjT24ybubbdAhWCy4UKHUpWBKIQ_AUICigB&biw=1366&bih=669#imgrc=ZliW32-5uC8mEM: (https://www.google.it/search?q=Geroglifici+egizi&stick=H4sIAAAAAAAAAONgFuLUz9U3MKwyKctT4gAxU9LKDLX4nPNzc_PzgjNTUssTK4sBY47ZuScAAAA&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjT24ybubbdAhWCy4UKHUpWBKIQ_AUICigB&biw=1366&bih=669#imgrc=ZliW32-5uC8mEM:)

b)https://www.google.it/search?q=cuneiforme&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjcj_-mubbdAhUShxoKHZjWDw4Q_AUICigB&biw=1366&bih=669#imgrc=AHIxDmZF3euL0M: (https://www.google.it/search?q=cuneiforme&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjcj_-mubbdAhUShxoKHZjWDw4Q_AUICigB&biw=1366&bih=669#imgrc=AHIxDmZF3euL0M:)

c) https://www.google.it/search?q=sanscrito&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjfkf7uubbdAhVJaBoKHUJiBX4Q_AUICigB&biw=1366&bih=669#imgrc=iMeabL26GLK2oM: (https://www.google.it/search?q=sanscrito&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjfkf7uubbdAhVJaBoKHUJiBX4Q_AUICigB&biw=1366&bih=669#imgrc=iMeabL26GLK2oM:)

Waiting your opinions
Title: Re: Unicode ?
Post by: Bert22306 on September 12, 2018, 09:26:51 pm
Ammappete che lingue difficili, Tempo. English is easier, and doesn't need accents.

I think other languages could also get by without accents, and apparently, some accents, like the "accent circonflexe" in French (the hat accent, like ê) are going into disuse. About time. (In case you're curious, that circonflexe accent indicates that at some point, the letter s was dropped from the word used in French. For example, tête in French, testa in Italian. Or forêt in French, foresta in Italian. Fête, festa. Interesting, but not terribly essential!)

We already talked about Italian use of accents, and I'd say also Spanish and Portuguese, where accents are particularly unessential.

I mean come on. In Spanish, who needs an accent for names, like Antonio or Lopez. It's silly. António López. Ma dai! Ti pare, Tempo? How else would you pronounce those names.

It's just a matter of getting used to understanding pronunciation and even meaning, by the context, instead of having it explicitly shown with an accent. Even in English, letter combinations and diphthongs can be pronounced differently, and no one uses accents for this. Like, the letters "gh" are pronounced differently, in "trough" and in "through," and no one seems to care.

In the Internet era, we should start a worldwide campaign to banish useless accents. Rah rah.

Title: Re: Unicode ?
Post by: Fifi on September 12, 2018, 10:53:48 pm
Hi Bert22306

Thank you for your post.

In the Internet era, we should start a worldwide campaign to banish useless accents. Rah rah.

Sorry but you have it all wrong.

I do not know where you are from, but let me tell you very carefully that it's because of position as yours that American firms like GAFA are hated by the whole world because of their disrespect for culture and languages ​​from other countries.

If one had to follow your reasoning, then English should not be chosen because it is not, by far, the most spoken language in the world.

In this case, it would be better to choose Hindu, Chinese or even Arabic (but you have to learn it, that, for what I know, is not a specialty of english speaking people).

Moreover, since QB64 claims to be compatible with MicroSoft QB4.5, then it really is and supports unicode.

PS: I lived almost 12 years in the USA and I always try to express myself as well as possible in this language which is not my native language and which is also different from that used in England, in Australia , in New Zealand, etc.

Nevertheless, I do not accept that my native language, or others, is distorted by the lack of development of a computer tool.

That said, this friendly remark is also due to the history of QB64 because I think Galleon never thought that his tool would be used around the world.

This is not a reason to camp on this position, especially if you want to see it used massively around the world, which is becoming more and more obvious by the addition of tools like InForm and vWATCH.

Thank you for thinking twice.

Cordially.
Fifi
Title: Re: Unicode ?
Post by: Bert22306 on September 12, 2018, 11:25:48 pm
Sorry but you have it all wrong.

I do not know where you are from, but let me tell you very carefully that it's because of position as yours that American firms like GAFA are hated by the whole world because of their disrespect for culture and languages ​​from other countries.

Latin needed no accents. It came multiple centuries before English, Fifi.

Quote
Nevertheless, I do not accept that my native language, or others, is distorted by the lack of development of a computer tool.

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.

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.

Anyway, you take this way too seriously, Fifi. It was meant more in jest.
Title: Re: Unicode ?
Post by: SMcNeill 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?
Title: Re: Unicode ?
Post by: Fifi 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
Title: Re: Unicode ?
Post by: Fifi 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
Title: Re: Unicode ?
Post by: SMcNeill 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.
Title: Re: Unicode ?
Post by: Bert22306 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.
Title: Re: Unicode ?
Post by: TempodiBasic 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
Title: Re: Unicode ?
Post by: Bert22306 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.
Title: Re: Unicode ?
Post by: SMcNeill 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! 

Title: Re: Unicode ?
Post by: Bert22306 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." :)
Title: Re: Unicode ?
Post by: SMcNeill 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.
Title: Re: Unicode ?
Post by: TempodiBasic 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/ (https://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 (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 (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
Title: Re: Unicode ?
Post by: Bert22306 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! :)
Title: Re: Unicode ?
Post by: SMcNeill 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.
Title: Re: Unicode ?
Post by: bplus 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?
Title: Re: Unicode ?
Post by: SMcNeill 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
Title: Re: Unicode ?
Post by: Bert22306 on September 13, 2018, 11:25:36 pm
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

I looked into this some time back, and it looks like CP437, the default one, has the most frequently used accents already in it. Then the other CPs extend the list of special characters, using the same numbered locations as CP437 for those symbols, but replacing some of the other stuff in CP437. Like replacing the Greek letters, various lines and blocks, and other such symbols, using those locations for more special accented characters.

It looks to me like anything required even for French already exists, in CP437. Not sure why a French keyboard should not be able to be fooled, to use CP437. Might not be perfect, but it should be enough for everyday writing.
Title: Re: Unicode ?
Post by: RhoSigma on September 14, 2018, 01:48:39 am
It looks to me like anything required even for French already exists, in CP437. Not sure why a French keyboard should not be able to be fooled, to use CP437. Might not be perfect, but it should be enough for everyday writing.

Yes, its enough for german and other european languages too, but fact is it doesn't work. And I'm sorry to bring this up and up again to scratch your nerves, it DID WORK in SDL, I can happily type german umlauts in the SDL version and they will correctly be displayed with the IDE set to its standard CP437. It even works first pressing the accent pre-selection key and after that pressing the "A" to get the "Á", but all this is broken since the transition to GL, which is 6 years ago, and nothing has changed since then.

For me it seemes that SDL has returned "raw" key codes according to the selected keyboard type, which then were ramapped by the QB64 input routines to CP437. Now with OpenGL I get the impression that it already returns ASCII key codes according to the systems default code page (in my case WIN-1252), which are not even touched anymore by the QB64 input routines to remap them too CP437, but instead these OpenGL returned values are placed onto the CP437 as is, which obviously gives the wrong char, because the value was already remapped to WIN-1252 by OpenGL. However saving a file with such wrong chars in the IDE and then reopen it with the Windows editor shows the correct chars. That's what convinces me that GL does any kind of system realated "pre-mapping", which SDL did not. This difference between SDL and GL must be sorted out, maybe GL has already another function which would us return the "unmapped" key codes as SDL did.