Greek Character Set

astalavista666astalavista666 Member Posts: 14
Is there any possibility to create an error message when a user tries to enter Greek Characters to a certain field(code20) ???

I have done something similar for char9,char10,char13 which works exceptionally but for this case NAV doesn't allow me to use values > 255 for Char Variables

Any ideas?

NAV 4 SP3

Answers

  • vaprogvaprog Member Posts: 1,141
    NAV doesn't allow me to use values > 255 for Char Variables
    NAV does not use codes > 255 to store characters either. It probably uses a codepage similar to but not necessarily identical to
    Code Page 1253 Windows Greek or Code Page 851 MS-DOS Greek 1.
    Basically, if you don't find an encoding table specifically for NAV C/AL on the net, you will have to find out yourself. To do so, extract the character in question (use the Text variable as if it was an ARRAY of Char), then either print it using FORMAT(Chr,0,'<Number>'); or assign it to an integer variable.
  • astalavista666astalavista666 Member Posts: 14
    actually i found Ascii table for Greek charset and the right codepage (http://www.ascii-codes.com/) and as fas as i tested it,it works fine!

    //jk02 - start
    
    FOR i := 128 TO 175 DO
    BEGIN
      Char := i;
      FindChar := STRPOS(Description, FORMAT(Char));
      IF FindChar <> 0 THEN ERROR(jk001);
    END;
    
    FOR i := 224 TO 240 DO
    BEGIN
      Char := i;
      FindChar := STRPOS(Description, FORMAT(Char));
      IF FindChar <> 0 THEN ERROR(jk001);
    END;
    
    //jk02 - end
    


    :D

    Thanks for your time, i appreciate it!
Sign In or Register to comment.