Author Topic: Ascii Code 212  (Read 2835 times)

0 Members and 1 Guest are viewing this topic.

Offline krovit

  • Forum Regular
  • Posts: 179
    • View Profile
Ascii Code 212
« on: February 01, 2020, 07:30:58 am »
Asci Code 212 (E width grave accent): how to insert it? Is it possibile?

I think it's only available Asci Code 144 (E width acute accent).

Nothing is easy, especially when it appears simple (and nothing could be as dangerous as trying to do good to others)

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: Ascii Code 212
« Reply #1 on: February 01, 2020, 10:32:25 am »
Hi,

Try this web site   http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=142&mode=decimal

You can enter decimal hex character etc ... and it will give you values that can be used in QB64. Sometimes it will calculate double bytes to produce the
character that you want. If you can view the hex value of the character you are trying to use then key this value straight into your QB64 and use the ASC function.

e.g.  E9$ = CHR$(233) ' e with a grave.  233 is the decimal value of it. I look for E9$ in my data and replace it with a normal 'e'

So in your case E$ = Chr$(202) .  Text$ = "A" + "B" + "C" + "D" +  E$

Now also remember what code page you are working with. The E$ may not reflect an E grave accent. When viewing a web page you will see the grave accent but when you a viewing a file dump you may see a different character displayed. That's when you need a hex editor to see what the hex or decimal value of the character is.

Try an easy character first such as A. You will see the results in the table and then try a couple more so you can then see a pattern.

Make sure you change the "Interpret As" field when entering data... make it decimal to enter 202

I have used the above method to translate Eastern European names into 'phonetic English' .

Mike

Offline krovit

  • Forum Regular
  • Posts: 179
    • View Profile
Re: Ascii Code 212
« Reply #2 on: February 01, 2020, 12:58:03 pm »
Thank you, the link is very useful, even for other issues that interest me.

But I confess that I did not understand how I can do to get that character printed (212).
I realized that I have to use special instructions...(1) but can you be clearer?

___
(1) Maybe https://qb64.org/wiki/Base_Comparisons
« Last Edit: February 01, 2020, 01:00:06 pm by krovit »
Nothing is easy, especially when it appears simple (and nothing could be as dangerous as trying to do good to others)

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: Ascii Code 212
« Reply #3 on: February 01, 2020, 05:26:37 pm »
Hi,

Do you want to print it ??

What are you printing now instead of the grave accent  ?

You can look at what internal code the printer will use to print the character you want. Look for CHR$(233) and translate that into the internal code that the printer will use. For some reason I have found that different programs will display special characters differently. It is something to do with the code page and UNICode. I have always looked at the character directly and used the web page to give me the decimal values. Try https://en.wikipedia.org/wiki/UTF-8 .. this may confuse you more. For the printer there will be a character table to look at somewhere on the manufacturer's web page. If both the code you supply and the code for the printer is the same then it is the translation problem of the printer . You will have to force it you use another codepage. This is where my knowledge stops.

Mike

Mike