[Ur] "Fatal error: Non-printable character 4294967248 in string to SQLify"

Adam Chlipala adamc at impredicative.com
Mon Feb 27 07:34:01 EST 2012


Alexei Golovko wrote:
> The problem seems to be in ADT rerpesentation, not in escaping...
>
> I did minimal example with this bug, see http://www.impredicative.com/mantis/view.php?id=128
>    

I maintain my position that the problem is in escaping.  By simplifying 
the query, you get it to a point where it can be assigned a query 
template statically, with holes that will only be filled with primitive 
datatypes, not arbitrary SQL expressions.  SQLite will do the "escaping" 
itself for such parameters.  With the fancier version, Ur/Web builds the 
whole query as a string, with parameter values and all.

Thus, the question I asked before remains: what is the right way to 
escape UTF-8 strings to use as string literals in MySQL and SQLite?

P.S.: You have a comment asking:
     (* Why "task initialize = init" does not work?
        But this is the second question. *)
I uncommented the alternate version and it at least type-checked fine.  
What kind of "not working" have you seen?



More information about the Ur mailing list