• utf-8 can be broken on many layers, I just tried in WEbIDE with czech letters.
    print(E.toArrayBuffer("ěščřýá"));
    typing this directly in left side console produce '?' and it really stores characters ?

    >print(E.toArrayBuffer("?????ýá"))
    new Uint8Array([63, 63, 63, 63, 63, 253, 225]).buffer
    

    putting this to right side editor and uploading is better and produces this, also when typing cursor up it can be sen it is sent via \u unicode encoding

    new Uint8Array([196, 155, 197, 161, 196, 141, 197, 153, 253, 225]).buffer
    >
    >print("\u00c4\u009b\u00c5\u00a1\u00c4\u­008d\u00c5\u0099\u00fd\u00e1");
    ÄÅ¡ÄÅýá
    =undefined
    

    so now this looks like utf-8 encoded except last two letters ýá which are more common and not specific to czech, correct encoding is maybe prined here https://mothereff.in/utf-8#%C4%9B%C5%A1%­C4%8D%C5%99%C3%BD%C3%A1

    so most probably it is broken already when uploading the source code.

    however when now tried to upload this print(E.toArrayBuffer("őýá")); the ő looks utf-8 encoded

    new Uint8Array([197, 145, 253, 225]).buffer
    >
    >print(E.toArrayBuffer("\u00c5\u0091\u00­fd\u00e1"));
    new Uint8Array([197, 145, 253, 225]).buffer
    

    so maybe 'correct' letters in that web page show because they are not utf-8 encoded and are actually also not shown as utf-8

About

Avatar for fanoush @fanoush started