Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
È vs ╚
#1
Big Grin 
I greet everyone!

Just one question (that's not true! [Image: biggrin.png]...) 

In Italian, there is the character "È" (an uppercase "è," one of the few with accents), but I can't reproduce it (chr$(200) produces ╚ , and this doesn't work either - I believe obviously -  Chr$(&H00C8). 

I am tired of writing " E' " instead of " È " (and it's also a grammatical error!).

Perhaps, as I understand it, a UNICODE character set is needed, or maybe a magic trick. 

To be honest, the standard character in QB64 works perfectly for me, but every now and then I come across some code examples with a more compact yet very readable and nice modern character: maybe that would finally print "È"?
Reply
#2
This is a simple process for you:

Code: (Select All)
Screen _NewImage(800, 600, 32)
f = _LoadFont("courbd.ttf", 64, "monospace")
_Font f

_MapUnicode 200 To 200
Print Chr$(200)
_Font 16
Sleep
System

Step 1: Load a font that has the character you need in it.
Step 2: Use _MapUnicode to map the unicode character to the ASCII character you want to replace.
Step 3: Use that ASCII code that you mapped to to print the character for you.

That's all it takes. Wink
Reply
#3
Hi Krovit
I am the echo...
yes Steve's answer solves all the issue about localization of QB64pe both for IDE, both for the working of KEYWORDS like PRINT and INKEY$ or INPUT$/INPUT string/character.
As you surely have already experienced if you take input from keyboard or text file, the input task doesn't recognize your local character set... so try to play hangman using accented letters... it is an infinite game!
Making a preset of UNICODE by using MapUnicode keyword is the right solution...

but if you want only to write accented characters into IDE you can change character set used in it.

[Image: Language-Characters-Setting.jpg]
this one is good for italian language,
in fact you are able to write accented characters into IDE (hey Man, for E' you must use the ASCII tool to paste the character into IDE, cause it is not on the keyboard)as the following screenshot shows you are not able to use those characters into code if you don't change the character set in use by _Mapunicode.
[Image: QB64windows-IDE-characters.jpg]

I hope this echo gives you the right direction.

Because I am digging in my old notebooks I can post here some examples that come far from now...2016!
I'll do this later.
Reply
#4
I found some files that show the approach to the issue of localization of QB64 (at that time) and QB64pe (now)

accenti.bas  shows the issue

[Image: accenti.jpg]

ASCII for ita3.bas is a attempt to solve the issue following the tips of CLIPPY with _mapUnicode.

MapUnicode Italian.bas  is the final solution working both for screen output both for keyboard input


[Image: Map-Unicode-2016.png]



It is a fine walking back to the past!

PS I'm working on a Lubuntu machine so I must adapt the font name and path!


Attached Files
.bas   ASCII_for_ita3_lub.bas (Size: 4.57 KB / Downloads: 26)
.bas   accenti.bas (Size: 490 bytes / Downloads: 19)
.bas   MapUnicode_Italian.bas (Size: 2 KB / Downloads: 24)
Reply
#5
Lucky for me I don't encounter any of these character problems when ordering PIZZA in QB64.

P È T È  Big Grin
Reply
#6
(09-08-2025, 09:03 PM)Pete Wrote: Lucky for me I don't encounter any of these character problems when ordering PIZZA in QB64.

P È T È  Big Grin
Hi Pete,

Hummm... Pizza and little else... What have we done to deserve all this?  

Anyway, yes. PIZZA has no accents, and I understand that it may have been an advantage for its spread Tongue

Around, I see languages with accented letters in ways that only a perverse imagination could conceive... Perhaps it depends on the incomprehensible sounds that the vocal cords are forced to emit (risking getting tangled). The Italian language is quite complicated, but the sound is smooth, sleek, and linear... few accents are needed.

The "È" is probably the only accented uppercase letter that can start a sentence in Italian. I understand that ASCII and UNICODE coders didn't put in much effort...  Huh 

I wonder what pizza you have in your area... I would be curious to taste it.

Anyway, even from these details, it's clear that you are a cornerstone of QB64 and a great programmer: I couldn't manage to order pizza via QB64; it's already a lot for me to try to handle the Fonts  Big Grin
Reply
#7
(09-08-2025, 08:22 PM)TempodiBasic Wrote: I found some files that show the approach to the issue of localization of QB64 (at that time) and QB64pe (now)

accenti.bas  shows the issue

[Image: accenti.jpg]

ASCII for ita3.bas is a attempt to solve the issue following the tips of CLIPPY with _mapUnicode.

MapUnicode Italian.bas  is the final solution working both for screen output both for keyboard input


[Image: Map-Unicode-2016.png]



It is a fine walking back to the past!

PS I'm working on a Lubuntu machine so I must adapt the font name and path!

Ah! The air of home... it's a pleasure to hear from you again.

You understand well the frustration regarding the use of a font that makes not only the input and output beautiful and professional but also the correct syntax in our language.

Thank you for the time you've spent on my request. It's incredible... every time I'm surprised: one asks a question that might even be a bit naive, if we want, but then sees that the answers are much less so.

The MapUnicode_italian file is interesting, but I believe the library (falcon) is missing - at least that's what the compiler indicates.

It would also be interesting to explore a way - if it exists and perhaps, it seems to me, it is not possible - to retrieve a character from a set and insert it into the code to display it alongside those from the set in use.

(09-07-2025, 11:12 PM)SMcNeill Wrote: This is a simple process for you:

Code: (Select All)
Screen _NewImage(800, 600, 32)
f = _LoadFont("courbd.ttf", 64, "monospace")
_Font f

_MapUnicode 200 To 200
Print Chr$(200)
_Font 16
Sleep
System

Step 1: Load a font that has the character you need in it.
Step 2: Use _MapUnicode to map the unicode character to the ASCII character you want to replace.
Step 3: Use that ASCII code that you mapped to to print the character for you.

That's all it takes.  Wink
Thank you, Steve.

Indeed, as you suggested, the code works great. We just need to find a monospace character that looks nice and prints well (but that's a whole other story).
Reply
#8
@krovit
_MAPUNICODE today

I seem that today in 2025 we needn't more Falcon.h, but at the days of that code (2016) it was so.
QB64pe grows up in the time! Cool
Reply
#9
The Italian language is like music to the ears, absolutely beautiful! Other languages, not so much. I mean I know just enough French to get me by, "Je me rends!" That will get you by, in a pinch. I like Japanese, but it always sounds like you're mad about something. I'm pretty sure it's based on Klingon. Now Chinese, Chinese is complicated. I mean had to constantly keep grabbing my nuts to get the tonal qualities correct; so I started watching Asian porn, just so that wouldn't feel so awkward. 

Kidding aside, those of you here who can speak two or more languages fluently, my hat's off to you. I have a hard enough time with English, my native language... It's probably because I just can't quite get the British accent part nailed.

Pete  Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)