rupenp / grammatical-framework

Automatically exported from code.google.com/p/grammatical-framework
0 stars 0 forks source link

Wrong encoding in error message #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am encountering an error message which is not using UTF-8 encoding, even 
though my grammar is in UTF-8. Consider the following minimal example:

abstract Abs = {
  cat C ;
  fun f : C;
}

concrete Cnc of Abs = {
  flags coding=utf8 ;
  lincat C = Str ;
  lin f = "hello";
  lin f = "ħello";
}

$ gf --batch Cnc.gf 
- compiling /tmp/gf/Cnc.gf... 
/tmp/gf/Cnc.gf:7:1:
   cannot unify the informations
    lin f = "hello" ;
and
    lin f = "öello" ;
in module Cnc

Original issue reported on code.google.com by johnjcam...@gmail.com on 20 Jan 2013 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by hallg...@chalmers.se on 20 Jan 2013 at 10:48

GoogleCodeExporter commented 9 years ago
Came across another such problem, though not sure if related:

concrete Cnc of Abs = {
  flags coding=utf8 ;
  lincat C = Str ;
  lin f = "abc"+Predef.error("ħello");
}

$ gf --batch Cnc.gf
- compiling /tmp/gf/Cnc.gf... gf: Internal error in Compute.ConcreteNew:
    glue (VString "abc",VError "\295ello")

Original comment by johnjcam...@gmail.com on 20 Jan 2013 at 12:15

GoogleCodeExporter commented 9 years ago
The example in comment #2 should now produce a better error message. The 
original issue still remains to be fixed.

Original comment by hallg...@chalmers.se on 28 Jan 2013 at 4:25

GoogleCodeExporter commented 9 years ago
This problem has now been fixed for UTF-8-encoded source files. Other encodings 
(except latin-1) still suffer from this problem.

Original comment by hallg...@chalmers.se on 28 Jan 2013 at 5:56

GoogleCodeExporter commented 9 years ago
Confirmed, thanks!

Original comment by johnjcam...@gmail.com on 28 Jan 2013 at 7:45

GoogleCodeExporter commented 9 years ago

Original comment by hallg...@chalmers.se on 28 Jan 2013 at 7:48