alexa-games / skill-flow-builder

Development suite that helps you create narrative-driven Alexa skills, including a GUI editor and CLI
Other
69 stars 19 forks source link

Bug: if condition doesn't compare strings with non-ASCII chars #48

Open travelingbear opened 3 years ago

travelingbear commented 3 years ago

Bug Report

Skill Flow Builder Version

2.1.0

ASK CLI Version

2.22.4

Current Behavior

Won't compare strings with non-ASCII chars. For example words like: "São Paulo", or "Maçã"

Expected Behavior

To compare strings with non-ASCII chars. For example words like: "São Paulo", or "Maçã"

Steps to Reproduce

create a skill with a simple if like this:

if 'São Paulo' == 'São Paulo' { -> correct }

It should give you an alert in the skill flow builder. If you ignore it, and try to build it anyway, you will receive the following message:

✔ Compile step completed. Importing locale pt-BR... ✘ story.abc:31 - Syntax Error: There is a problem with your condition. Erroring word(s): == 'São Paulo' ✘ Found 1 import errors.

Additional Information

It may be the case of a bug (not a feature request from what I understand) given conditions should be able to compare strings in UTF.

Operating System

Node Version

14.15.5

// code samples

@start
  *say
    Diga um estado.
    *then
        -> ouvir

@ouvir
    *then
        slot var_voce_disse as 'AMAZON.Region'
        hear {var_voce_disse} {
            if var_voce_disse == 'Amazonas' {
                -> voce_disse
                >> RETURN
                }
            if var_voce_disse == 'São Paulo' {
                -> voce_disse
                >> RETURN
            }
        }

@voce_disse
    *say
        Você disse {var_voce_disse}
    *then
        >> RETURN