Help converting Hex UTF-8 bytes to character

Mark Waddingham mark at livecode.com
Fri Jun 1 03:06:50 EDT 2018


On 2018-06-01 06:21, Monte Goulding via use-livecode wrote:
>> On 1 Jun 2018, at 2:18 pm, Trevor DeVore via use-livecode 
>> <use-livecode at lists.runrev.com> wrote:
>> 
>> Yes it does! `format` is my new best friend.
> 
> Hmm… why not just throw the whole thing at format? If it has one
> escape sequence it might have others and you can’t put one in there
> and expect a single `\` to be literal.

@Trevor : Monte makes a good point here - \x is the standard C escape 
for a single byte char. If a string format does \x, then it also has to 
escape \ as \\ - unless it requires \ to be encoded in \x form (which is 
certainly plausible - URL encoding requires that of % which is the 
escape character).

Do you have a spec for the escaped strings you are processing?

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list