Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looks to be related to ticket #1986, where it is discussed whether this is a "bug" or the Internet changing out from under its own spec:</p> <p><a href="http://curecode.org/rebol3/ticket.rsp?id=1986" rel="nofollow">Have DEHEX convert UTF-8 sequences from browsers as Unicode</a>.</p> <p>If you have specific experience on what has become standard in Chinese, and want to weigh in, that would be valuable.</p> <p>Just as an aside, the specific case above could have been handled in PARSE alternately as:</p> <pre><code>key-value: {field=%E4%BA%BA} utf8-bytes: copy #{} either parse key-value [ copy field-name to {=} skip some [ and {%} copy enhexed-byte 3 skip ( append utf8-bytes dehex enhexed-byte ) ] ] [ print [field-name {is} to string! utf8-bytes] ] [ print {Malformed input.} ] </code></pre> <p>That will output:</p> <pre><code>field is 人 </code></pre> <p>With some comments included:</p> <pre><code>key-value: {field=%E4%BA%BA} ;-- Generate empty binary value by copying an empty binary literal utf8-bytes: copy #{} either parse key-value [ ;-- grab field-name as the chars right up to the equals sign copy field-name to {=} ;-- skip the equal sign as we went up to it, without moving "past" it skip ;-- apply the enclosed rule SOME (non-zero) number of times some [ ;-- match a percent sign as the immediate next symbol, without ;-- advancing the parse position and {%} ;-- grab the next three chars, starting with %, into enhexed-byte copy enhexed-byte 3 skip ( ;-- If we get to this point in the match rule, this parenthesized ;-- expression lets us evaluate non-dialected Rebol code to ;-- append the dehexed byte to our utf8 binary append utf8-bytes dehex enhexed-byte ) ] ] [ print [field-name {is} to string! utf8-bytes] ] [ print {Malformed input.} ] </code></pre> <p><em>(Note also that "simple parse" is getting the axe in favor of <a href="http://curecode.org/rebol3/ticket.rsp?id=1886" rel="nofollow">enhancements to SPLIT</a>. So writing code like <code>parse data "="</code> can now be expressed instead as <code>split data "="</code>, or other cool variants if you check them out...samples are in the ticket.)</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload