Menu

WIll Unicode issues be resolved?

2011-10-02
2012-11-23
  • doug edmunds

    doug edmunds - 2011-10-02

    I would like to be able to do some work with English to Spanish using CLIPS,
    but there are problems. I wrote a batch file (spanish_chars.batch) that uses
    an accented 'a' and the 'n' with the tilde over it.

    How it is written using a text editor in Windows 7:
    ;start

    (deftemplate sp
      (slot english) (slot spanish))

    (deffacts spanish-chars
      (sp (english wind) (spanish  "el niño"))
      (sp (english windy) (spanish  niño)))

    (reset)
    (run)
    (facts)
    (printout t (explode$ "this is a test") crlf)
    (printout t (explode$ "this is el niño") crlf)
    (printout t (explode$ "this is another test") crlf)

    ;end

    How it appears in CLIPS when the file is opened (note the loss of the Spanish characters):

    ;start

    (deftemplate sp
      (slot english) (slot spanish))

    (deffacts spanish-chars
      (sp (english wind) (spanish  "el niño"))
      (sp (english windy) (spanish  niño)))

    (reset)
    (run)
    (facts)
    (printout t (explode$ "this is a test") crlf)
    (printout t (explode$ "this is el niño") crlf)
    (printout t (explode$ "this is another test") crlf)

    ;end

    Output when loaded as a batch file:

    (clear)
    CLIPS> (batch "D:/Program Files/clips/Bin/spanish_chars.batch")
    TRUE
    CLIPS> (deftemplate sp
      (slot english) (slot spanish))
    CLIPS>
    (deffacts spanish-chars
      (sp (english wind) (spanish  "el niño"))
      (sp (english windy) (spanish  niño)))
    CLIPS>
    (reset)
    CLIPS> (run)
    CLIPS> (facts)
    f-0     (initial-fact)
    f-1     (sp (english wind) (spanish "el niño"))
    f-2     (sp (english windy) (spanish niño))
    For a total of 3 facts.
    CLIPS> (printout t (explode$ "this is a test") crlf)
    (this is a test)
    CLIPS> (printout t (explode$ "this is el niño") crlf)
    (this is el niño)
    CLIPS> (printout t (explode$ "this is another test") crlf)
    (this is another test)
    CLIPS>

    Is there any likelihood that this issue will be resolved?

    I also notice that the the US-International keyboard does not work correctly in CLIPSWin.  The deadkey+a for example does not put anything on the screen.

     
  • doug edmunds

    doug edmunds - 2011-10-02

    My own reply.  Use the clipsshell editor from  http://code.google.com/p/clipseditor  

     

Log in to post a comment.