Menu

Accented caracters in french

Anonymous
2017-07-16
2017-08-02
  • Anonymous

    Anonymous - 2017-07-16

    Hi
    My name is Claude and just starting to enjoy PC-BASIC. It puts the fun back at using my computer !
    Trying to get french accented caracters with codepage 863 or 850 the desired caracters appears on the screen with an apostrophe or a bracket preceding it
    à is on the screen as à è givesè
    and â gives [â
    also I cannot get the accented uppercase version of the caracters

    Thanks for your attention
    Claude

     
  • Rob Hagemans

    Rob Hagemans - 2017-07-18

    Hi Claude, a few questions:

    • what version of PC-BASIC and what operating system do you use?
    • How do you enter the characters?
    • Does the problem also arise if you print the characters from a statement? (e.g. PRINT CHR$(130) with codepage 180)
     
  • Anonymous

    Anonymous - 2017-07-19

    Hi Rob,

    Thanks for the reply.
    I am using PC-Basic version 15-08-11 on windows -7 pro.

    The normal way to enter accented characters with the keyboard is to hit two keys
    except for letter é and É, which character has its own key on a Canadian French keyboard.
    to get è you first hit a key ` (Which does not print)followed by the character you want an "Accent grave" on, in this case e or a.
    To get an "Accent circumflex" you first enter ^ (which does not print followed immediately by the character you whish so accented, like â
    it works with upper cases letters È, À, Â, Ô, Ù AND EVEN THE "TREMA" Ï,ï and ë,Ë.......

    the problem in PC-Basic is with KEYBOARD entry , NOT when programming where I can enter the ascii value like CHR$(130). that works "No problem" for all mentioned above characters.

    I tried to get the ascii value of those first character but I get nothing

    10 input a$
    20 print asc(a$)

    return Nothing or sometime an illegal function call.
    there is a dedicated key for the apostrophe itself and the above program returns the ascii value of 39 which is correct

    Seems the code page does NOT ignore the first (Control) character but print an ascii(39) followed by the correct character. Its the first Ascii(39) that is not wanted to be printed.

    Hope these explanations are clear enough to someone who does not have a Franch Canadian keyboard .

    I could send you a picture of the Keyboard if you want.

    Question: would the "add attachement" work for that ?

    Many thanks and sorry to impose the problem on you

    Regards

    Claude

     
  • Anonymous

    Anonymous - 2017-07-19

    Sorry for an error
    the program below actually returns asc(39) when I press the Accent "Control" key for the "accent grave"

    10 input a$
    20 print asc(a$)

     
  • Rob Hagemans

    Rob Hagemans - 2017-07-23

    Hi Clause, thanks for the information. I think the problem lies with how yor keyboard's signals are interpreted; it appears your keyboard's composing keys are reported as separate keypresses, rather than as a single character. Could you try if the development version https://github.com/robhagemans/pcbasic/releases/tag/16.12.0rc0 solves this issue? That version uses a different library for keyboard input, which may not have the problem.

     
  • Anonymous

    Anonymous - 2017-07-28

    Hi Rob,

    Separate keypresses is exactly the probelm.
    I will try the other release and advise
    Sorry for the delay coming back to you, it is vacation period around here.

    Thank You
    Claude

     
  • Anonymous

    Anonymous - 2017-07-29

    Hello Rob

    In the version 16.12.0rc0 the lower case accented french characters are OK, all perfect.
    BUT
    Cannot get the accented Uppercase characters. In the case of the Uppercase ones, NOTING is printed.

    Still, Non-accented uppercase characters are acceptable in the French language although accented uppercase is prefered.

    I will be hoping the 15-08-12 version will handle the accented characters as well as the Commas formating with the PRINT USING statement , That is much needed in my accounting programs.
    I have created a small routine that replace the missing print using Commas function and all is well for now.

    Regards
    Claude

     
  • Rob Hagemans

    Rob Hagemans - 2017-07-29

    Hi Claude, thanks for the information!

    For the uppercase characters where nothing is printed, are you 100% sure that these characters are indeed present in the codepage you're using? You could check by printing the whole character set with

    10 FOR I=32 TO 255
    20   PRINT CHR$(I);
    30 NEXT
    

    I'm asking because if a character is not present in the codepage, PC-BASIC will indeed ignore it if it is input through the keyboard, so that would explain.

    The PRINT USING issue should be fixable but I don't want to create too high expectations regarding the accented characters in the stable version - the development version uses a completely different library than the stable version, and this is not easily backported. That said, there is a new version of Pygame which I'll use for the next stable release, and there's always hope that this problem is solved there. Unfortunately this kind of thing depends on the hardware itself, and the operating system, as well as the interface library... I dont know enough about Pygame's source code and I don't own a French Canadian keyboard, so I can't really begin to debug the issue.

    Rob

     
  • Anonymous

    Anonymous - 2017-07-29

    Hi Rob,

    Man YOU know your business !

    Using code pages 850 or 863, I do get all the accented characters Lower case AND upper case.
    Default code page 437 carries the lower case but not the uppercase accented Chars.

    Problem SOLVED

    Many thanks

     
  • Anonymous

    Anonymous - 2017-08-01

    That is using version 16 dev.
    V15 still do not offer accented chars no matter which code page is used.
    But using V16 is OK whith me

    Claude

    P.S. You do not need a french Canadian keyboard to get those chars.
    An american Keyboard using code pages 850 or 853 will do the job all right.

     
  • Rob Hagemans

    Rob Hagemans - 2017-08-01

    Hi Claude, the problem seems to be the accent "dead keys" where you press an accent key and then a letter, and together it produces a accented letter. Standard US or UK keyboards don't really have that feature in a normal Windows setup. Perhaps it depends on the Windows keyboard settings? Is there a standard setting for Canadian French using a US keyboard?

     
  • Anonymous

    Anonymous - 2017-08-02

    Hi Rob,

    The vowels in the French language may be accented to produce a different pronunciation (Different sound)
    With code pages 850 and 863 setup in Windows, an american keybord will produce the accented characters (Vowels) of the French language as follows:
    (NB: The FRENCH "Like in FRANCE" AZERTY keyboard does it very differently)

    The key immediately to the right of the letter "P" is the"Dead Key" that will produce de Following accented Vowels: â,ê î ô,û "Called the "Circumflex")
    The second key to the right of the letter "P" is the "Dead key" that will produce the "Cedille"letter "C" like " ç ,Ç"
    That same second key to the right of of the letter "P" when SHIFTED, becomes be the "Dead Key that will produce the Accented vowels: ä, Ä,ë,Ë,ï,Ï,ö,Ö,ü,Ü "Called the "Trema" as in "Noël"

    The second key to the right of the letter "L" on an US Keyboard is the dead key that will produce the "Accent grave" as in: à,À,è,È,ì,Ì,ò,Ò,ù,Ù

    The third key to the right of the letter "M" is the key that will "DIRECTLY in one stroke" produce the accented letter é, and when shifted, the upper case letter É.

    Enjoy the complication of accented letters in other language than English (Try Spanish)

    All my best
    Claude (ycarc@axion.ca)

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.