validator messages cant stand non ascii text

20 views
Skip to first unread message

Franklin Brauning

unread,
Oct 30, 2016, 10:11:38 AM10/30/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
I did a major string "spanishification" to a project and got a regression:

I have an #is_integer { text="debe ingresar número" }  (ú being the problem trigger)

When that validator gets loaded the connection to the server gets broken.

Meanwhile, In the server I get error:

{[{reason,badarg},
  {mfa,{cowboy_simple_bridge_anchor,websocket_info,3}},
  {stacktrace,
      [{erlang,iolist_to_binary,
           [[<<"nitrogen_system_event:">>,
             {error,
...

Then dumps js code (I just scope the word "número").
...

cality, { notAnIntegerMessage: \"debe ingresar n">>,
                 [[[[[[[<<"\372mero\", onlyInteger: true });">>]]]]]]]}]],
           []},
       {cowboy_simple_bridge_anchor,massage_reply,3,
           [{file,"src/cowboy_bridge_modules/cowboy_simple_bridge_anchor.erl"},
            {line,85}]},


Things to consider:
 *  the #is_integer validator builds the message with this instruction:

    Script = wf:f("v.add(Validate.Numericality, { notANumberMessage: \"~ts\", onlyInteger: false });", [Text]),

 * the string "número" gets translated by erlang as "n\303\272mero"
    Maybe that handling is conflicting with the previous call.

How should I handle this without resorting to ascii only?
 



Ramkrishna Kulkarni

unread,
Nov 1, 2016, 12:53:42 AM11/1/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Franklin,

You can use a custom validator instead.

#custom {
text="debe ingresar número",
function=fun(_Tag, Value) -> is_integer(Value) end

Jesse Gumm

unread,
Nov 1, 2016, 9:00:25 PM11/1/16
to nitrogenweb
Hi Franklin,

Are you running from the latest master or is this in a tagged version?

I tried from latest master and did not have problems with the unicode rendering.

If you're running from 2.3.1, give the latest master a shot and see if that helps,

-Jesse

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.
To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Jesse Gumm

unread,
Nov 2, 2016, 2:49:51 PM11/2/16
to nitrogenweb
Hi Franklin,

I did some more looking (and wrote a test for this to make sure it works) and I'm finding I'm unable to reproduce this: 


Unicode support was fixed in validations on Nov 2014, and the snippet you posted was from a recent version.

Which version of Erlang are you running?  I tested with Erlang 18.

-Jesse


fran

unread,
Nov 2, 2016, 3:02:37 PM11/2/16
to nitro...@googlegroups.com
In rebar.config
{nitrogen_core, {git,
"git://github.com/nitrogen/nitrogen_core",{branch, master}}},

on Otp 18.2
>>> email to nitrogenweb...@googlegroups.com.
>>> To post to this group, send email to nitro...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/nitrogenweb.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Jesse Gumm
>> Owner, Sigma Star Systems
>> 414.940.4866 || sigma-star.com || @jessegumm
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> nitrogenweb...@googlegroups.com.

Jesse Gumm

unread,
Nov 2, 2016, 3:13:24 PM11/2/16
to nitrogenweb
Interesting.

Would you be willing to try this:

In a separate directory:

cd NitrogenProject.com
make cowboy run


And let me know what happens?

In the Erlang Shell, it should say this:

...Passed (blank_test)
...Passed (fullname_test)
...Passed (allpass_test)
...Passed (passwordconfirm_test)
...Passed (shortpassword_test)
...Passed (badnumber_test)
...Passed (number_out_of_range_test)
...Passed (unicode_value_test)
...Passed (unicode_comparison_test)
...Passed (unicode_comparison_pass_test)
...Passed (unicode_validator_test)
...Passed (clear_validation_test)
...Passed (unicode_integer_test)
Module "/tests/validation" (13 of 13 tests passed)

The last one there (unicode_integer_test) is the applicable one.

-Jesse


>>> To post to this group, send email to nitro...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/nitrogenweb.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Jesse Gumm
>> Owner, Sigma Star Systems
>> 414.940.4866 || sigma-star.com || @jessegumm
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

> To post to this group, send email to nitro...@googlegroups.com.
> Visit this group at https://groups.google.com/group/nitrogenweb.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

Franklin Brauning

unread,
Nov 2, 2016, 3:35:14 PM11/2/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Im getting runs where some test timeouts

>>> To post to this group, send email to nitro...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/nitrogenweb.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Jesse Gumm
>> Owner, Sigma Star Systems
>> 414.940.4866 || sigma-star.com || @jessegumm
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

> To post to this group, send email to nitro...@googlegroups.com.
> Visit this group at https://groups.google.com/group/nitrogenweb.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

fran

unread,
Nov 2, 2016, 3:37:49 PM11/2/16
to nitro...@googlegroups.com
=INFO REPORT==== 2-Nov-2016::16:29:46 ===
Recaching Template: ./templates/demos46.html
...Passed (blank_test)
...Passed (fullname_test)
...Passed (allpass_test)
...Passed (passwordconfirm_test)
...Passed (shortpassword_test)
...Passed (badnumber_test)
...Passed (number_out_of_range_test)
...Passed (unicode_value_test)
...Passed (unicode_comparison_test)
...FAILED (unicode_comparison_pass_test).
Reason: {timeout,2000}
...Passed (unicode_validator_test)
...Passed (clear_validation_test)
...Passed (unicode_integer_test)
Module "/tests_validation" (12 of 13 tests passed)



(nitr...@127.0.0.1)1> ...Passed (blank_test)
...Passed (fullname_test)
...Passed (allpass_test)
...Passed (passwordconfirm_test)
...Passed (shortpassword_test)
...Passed (badnumber_test)
...Passed (number_out_of_range_test)
...Passed (unicode_value_test)
...Passed (unicode_comparison_test)
...Passed (unicode_comparison_pass_test)
...Passed (unicode_validator_test)
...Passed (clear_validation_test)
...FAILED (unicode_integer_test).
Reason: {timeout,2000}
Module "/tests_validation" (12 of 13 tests passed)

...Passed (blank_test)
...Passed (fullname_test)
...Passed (allpass_test)
...Passed (passwordconfirm_test)
...Passed (shortpassword_test)
...Passed (badnumber_test)
...Passed (number_out_of_range_test)
...Passed (unicode_value_test)
...Passed (unicode_comparison_test)
...Passed (unicode_comparison_pass_test)
...Passed (unicode_validator_test)
...Passed (clear_validation_test)
...FAILED (unicode_integer_test).
Reason: {timeout,2000}
Module "/tests_validation" (12 of 13 tests passed)


(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1>
(nitr...@127.0.0.1)1> ...Passed (blank_test)
...Passed (fullname_test)
...Passed (allpass_test)
...Passed (passwordconfirm_test)
...Passed (shortpassword_test)
...Passed (badnumber_test)
...Passed (number_out_of_range_test)
...Passed (unicode_value_test)
...Passed (unicode_comparison_test)
...Passed (unicode_comparison_pass_test)
...Passed (unicode_validator_test)
...FAILED (clear_validation_test).
Reason: {timeout,2000}
...Passed (unicode_integer_test)
Module "/tests_validation" (12 of 13 tests passed)


(nitr...@127.0.0.1)1> ...Passed (blank_test)
...Passed (fullname_test)
...Passed (allpass_test)
...Passed (passwordconfirm_test)
...Passed (shortpassword_test)
...Passed (badnumber_test)
...Passed (number_out_of_range_test)
...Passed (unicode_value_test)
...Passed (unicode_comparison_test)
...Passed (unicode_comparison_pass_test)
...Passed (unicode_validator_test)
...Passed (clear_validation_test)
...Passed (unicode_integer_test)
Module "/tests_validation" (13 of 13 tests passed)
>> >>> email to nitrogenweb...@googlegroups.com.
>> >>> To post to this group, send email to nitro...@googlegroups.com.
>> >>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Jesse Gumm
>> >> Owner, Sigma Star Systems
>> >> 414.940.4866 || sigma-star.com || @jessegumm
>> >>
>> >
>> >
>> >
>> > --
>> > Jesse Gumm
>> > Owner, Sigma Star Systems
>> > 414.940.4866 || sigma-star.com || @jessegumm
>> >
>> > --
>> > You received this message because you are subscribed to a topic in the
>> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> > Erlang"
>> > group.
>> > To unsubscribe from this topic, visit
>> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to
>> > nitrogenweb...@googlegroups.com.
>> > To post to this group, send email to nitro...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to nitrogenweb...@googlegroups.com.
>> To post to this group, send email to nitro...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> nitrogenweb...@googlegroups.com.

Jesse Gumm

unread,
Nov 2, 2016, 4:05:39 PM11/2/16
to nitrogenweb
Interesting.

The isolated timeouts can /usually/ be ignored.

But the fact that the unicode_integer_test passed is the big thing that's standing out to me indicating that it works in some context with cowboy.

But in your application, there's something there that's causing the conversion from \303\272

From here, there are three ways I can think to debug this, escalating in trust from you:

1) Send me the exact module you're using (either pastebin or email)

or (and this might be a big deal for you)

2) Give me access to the repo and I can try to clone the whole thing (again either github, gitlab, bitbucket or whatever)

or

3) Remote screen sharing to see everything from your perspective.

I know each of these has a level of trust, but this is genuinely confusing me, but without the full context, my initial instincts are failing me.

My email is gu...@sigma-star.com if you want to share that way.

Thanks,

-Jesse



>> >>> To post to this group, send email to nitro...@googlegroups.com.
>> >>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Jesse Gumm
>> >> Owner, Sigma Star Systems
>> >> 414.940.4866 || sigma-star.com || @jessegumm
>> >>
>> >
>> >
>> >
>> > --
>> > Jesse Gumm
>> > Owner, Sigma Star Systems
>> > 414.940.4866 || sigma-star.com || @jessegumm
>> >
>> > --
>> > You received this message because you are subscribed to a topic in the
>> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> > Erlang"
>> > group.
>> > To unsubscribe from this topic, visit
>> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to

>> > To post to this group, send email to nitro...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

>> To post to this group, send email to nitro...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

> To post to this group, send email to nitro...@googlegroups.com.
> Visit this group at https://groups.google.com/group/nitrogenweb.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

fran

unread,
Nov 3, 2016, 9:58:14 AM11/3/16
to nitro...@googlegroups.com
ok, stripped all the code and got this:

-----------------------------------------
-module (establecimiento).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").

main() ->
#template { file="./site/templates/bare.html" }.

body() ->
wf:wire(submit, textarea, #validate { validators=[
#is_integer { text="ú" } % #is_email fails too
]}),
wf:flush(),
some_text.
-----------------------------------------

the real module was obviously bigger and the path to trigger this
was't throung several postbacks...
As you see, when #is_integer message is nonascii it will raise the
exception: change that to ascii
and all is fine.

it fails with #is_email too and all the wire(...) family functions
fail too (defer, eager)

The point the the "submit" or "textarea" dont exist isn't relevant.
>> >> >>> email to nitrogenweb...@googlegroups.com.
>> >> >>> To post to this group, send email to nitro...@googlegroups.com.
>> >> >>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> >>> For more options, visit https://groups.google.com/d/optout.
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Jesse Gumm
>> >> >> Owner, Sigma Star Systems
>> >> >> 414.940.4866 || sigma-star.com || @jessegumm
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Jesse Gumm
>> >> > Owner, Sigma Star Systems
>> >> > 414.940.4866 || sigma-star.com || @jessegumm
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to a topic in
>> >> > the
>> >> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> >> > Erlang"
>> >> > group.
>> >> > To unsubscribe from this topic, visit
>> >> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe
>> .
>> >> > To unsubscribe from this group and all its topics, send an email to
>> >> > nitrogenweb...@googlegroups.com.
>> >> > To post to this group, send email to nitro...@googlegroups.com.
>> >> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >> >
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> an
>> >> email to nitrogenweb...@googlegroups.com.
>> >> To post to this group, send email to nitro...@googlegroups.com.
>> >> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >
>> >
>> >
>> > --
>> > Jesse Gumm
>> > Owner, Sigma Star Systems
>> > 414.940.4866 || sigma-star.com || @jessegumm
>> >
>> > --
>> > You received this message because you are subscribed to a topic in the
>> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> > Erlang"
>> > group.
>> > To unsubscribe from this topic, visit
>> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to
>> > nitrogenweb...@googlegroups.com.
>> > To post to this group, send email to nitro...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to nitrogenweb...@googlegroups.com.
>> To post to this group, send email to nitro...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> nitrogenweb...@googlegroups.com.

Jesse Gumm

unread,
Nov 4, 2016, 4:07:22 PM11/4/16
to nitrogenweb
So this module works fine when I copy it into my projects.

It properly generates this:

Nitrogen.$anchor('page', '.wfid_textarea');v.add(Validate.Numericality, { notAnIntegerMessage: "ú", onlyInteger: true });

Would you be willing/able to zip up the whole project (stripped of anything you don't feel comfortable sharing) and share it with me? (Are you running linux, btw?)

Seeing this happening in context will help to figure out what's going on here.

-Jesse



>> >> >>> To post to this group, send email to nitro...@googlegroups.com.
>> >> >>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> >>> For more options, visit https://groups.google.com/d/optout.
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Jesse Gumm
>> >> >> Owner, Sigma Star Systems
>> >> >> 414.940.4866 || sigma-star.com || @jessegumm
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Jesse Gumm
>> >> > Owner, Sigma Star Systems
>> >> > 414.940.4866 || sigma-star.com || @jessegumm
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to a topic in
>> >> > the
>> >> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> >> > Erlang"
>> >> > group.
>> >> > To unsubscribe from this topic, visit
>> >> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe
>> .
>> >> > To unsubscribe from this group and all its topics, send an email to

>> >> > To post to this group, send email to nitro...@googlegroups.com.
>> >> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >> >
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> an

>> >> To post to this group, send email to nitro...@googlegroups.com.
>> >> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >
>> >
>> >
>> > --
>> > Jesse Gumm
>> > Owner, Sigma Star Systems
>> > 414.940.4866 || sigma-star.com || @jessegumm
>> >
>> > --
>> > You received this message because you are subscribed to a topic in the
>> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> > Erlang"
>> > group.
>> > To unsubscribe from this topic, visit
>> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to

>> > To post to this group, send email to nitro...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

>> To post to this group, send email to nitro...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

> To post to this group, send email to nitro...@googlegroups.com.
> Visit this group at https://groups.google.com/group/nitrogenweb.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

Franklin Brauning

unread,
Nov 4, 2016, 4:38:03 PM11/4/16
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Weird, the development repo is from 2 months ago.

Yesterday, I cloned the test repo you told me, I put that module (establecimiento.erl)
and It also dies with error.

Here is the package (it is the repo you told me to clone yeasterday) with the synthetized
module
https://drive.google.com/open?id=0BzZ8yE1UITBdQ1VldE9PQ1BvTGM

the error traces  here: https://drive.google.com/open?id=0BzZ8yE1UITBdUFJYdU4xQ2tGLWM

I access http://localhost:8123/establecimiento   , and KABUUM?

I'm on slackware, in the office and in the home (different computers).
I tried setting LANG=C, no changes.
>> >> >>> email to nitrogenweb...@googlegroups.com.

>> >> >>> To post to this group, send email to nitro...@googlegroups.com.
>> >> >>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> >>> For more options, visit https://groups.google.com/d/optout.
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Jesse Gumm
>> >> >> Owner, Sigma Star Systems
>> >> >> 414.940.4866 || sigma-star.com || @jessegumm
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Jesse Gumm
>> >> > Owner, Sigma Star Systems
>> >> > 414.940.4866 || sigma-star.com || @jessegumm
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to a topic in
>> >> > the
>> >> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> >> > Erlang"
>> >> > group.
>> >> > To unsubscribe from this topic, visit
>> >> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe
>> .
>> >> > To unsubscribe from this group and all its topics, send an email to

>> >> > To post to this group, send email to nitro...@googlegroups.com.
>> >> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >> >
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> an

>> >> To post to this group, send email to nitro...@googlegroups.com.
>> >> Visit this group at https://groups.google.com/group/nitrogenweb.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >
>> >
>> >
>> > --
>> > Jesse Gumm
>> > Owner, Sigma Star Systems
>> > 414.940.4866 || sigma-star.com || @jessegumm
>> >
>> > --
>> > You received this message because you are subscribed to a topic in the
>> > Google Groups "Nitrogen Project / The Nitrogen Web Framework for
>> > Erlang"
>> > group.
>> > To unsubscribe from this topic, visit
>> > https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to

>> > To post to this group, send email to nitro...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/nitrogenweb.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

>> To post to this group, send email to nitro...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
> group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

> To post to this group, send email to nitro...@googlegroups.com.
> Visit this group at https://groups.google.com/group/nitrogenweb.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

Jesse Gumm

unread,
Nov 4, 2016, 6:19:50 PM11/4/16
to nitrogenweb
Thanks.

I had to wipe full release's libraries due to dependent libraries not working (something with ssl), so I wasn't able to completely reproduce your environment. And once I got the system to load, it worked as expected.

BUT...

I suspect there's something up with your Erlang installation, particularly the unicode library.  From your stacktrace, the existence of the {error, X, Y} tuple in the value attempting to be converted to binary by cowboy (see attachment) indicates that the unicode:characters_to_binary/1 call is crashing at the ú character in your system.

If you run the following from the erlang shell, what do you get?

unicode:characters_to_binary("ú")

I want to request that you actually *type* the command rather than copy-and-pasting it.

-Jesse

To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.
failed unicode.png

fran

unread,
Nov 4, 2016, 9:16:15 PM11/4/16
to nitro...@googlegroups.com
In the erlang shell

[I type the accent key] [ I type u]
... and instead of showing the ú char the shell instantly replaces with
Eshell V7.2.1 (abort with ^G)
1> \303\272
2> C = "\303\272".
"\303\272"
3> length(C).
2
4> [Ca,Cb] = C.
"\303\272"
5> Ca.
195
6> Cb.
186
---------------
The trace also mentions a "ú\" where came that backslash from

-------------------------
When the message is "debe ingresar número"
In the shell
Eshell V7.2.1 (abort with ^G)
1> Msg = "debe ingresar n\303\272mero".
"debe ingresar n\303\272mero"
2>

the error is:
...
notAnIntegerMessage: \"debe ingresar n">>,
[[[[[[[<<"\372mero\",
...
notAnIntegerMessage: \"debe ingresar n\372mero\",
...

WTF? \372? That 372 came from \30[3]\2[72] (thats for sure)

Another string:
"cami½n"
appears as \"cami\275n\" when it should be "cami\303\263n"

fran

unread,
Nov 4, 2016, 9:19:17 PM11/4/16
to nitro...@googlegroups.com
I correct that last string:
"cami½n"
appears as \"cami\275n\" when it should be "cami\302\275n"

Jesse Gumm

unread,
Nov 4, 2016, 9:54:58 PM11/4/16
to nitrogenweb
Interesting.

This is quite the perplexing error.

It's been a while since I've compiled Erlang from source, but is Erlang compiled from source, or did you use a version from a package manager?  For folks running Debian or Ubuntu, I typically recommend installing the packages from erlang-solutions.com, but on Slackware, I'm assuming you've installed from source.

But I'm sort of at a loss here. I had a look through the compile switches, but I didn't see anything that particularly stood out that would cause unicode handling to fail.

You could try using binaries instead of strings and see if that helps.

Like

<<"ú"/utf8>>.

And see if it handles it better.

But I'm just spitballing here,

-Jesse


>>> To post to this group, send email to nitro...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/nitrogenweb.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Jesse Gumm
>> Owner, Sigma Star Systems
>> 414.940.4866 || sigma-star.com || @jessegumm
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang"
>> group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/nitrogenweb/06nYi5zF1fE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

>> To post to this group, send email to nitro...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/nitrogenweb.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages