On Wed, Jun 3, 2009 at 4:44 PM, Lorenzo Fiorini
<lorenzo.fior...@gmail.com> wrote:

> Is there already a function that escape a string using the following schema:
>
> char
>    any-Unicode-character-
>        except-"-or-\-or-
>        control-character
>    \"
>    \\
>    \/
>    \b
>    \f
>    \n
>    \r
>    \t
>    \u four-hex-digits

Don't worry. I've done it using:

hb_strToUtf8( tip_jsonspecialchars( xValue, '"' ) ) where
tip_jsonspecialchars is a modified tip_htmlspecialchars that also add
delimiters.

If there is a more efficient way to do it let me know.

best regards,
Lorenzo
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to