Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for UTF8 (0.16 sec)

  1. src/bytes/buffer_test.go

    	}
    }
    
    func TestRuneIO(t *testing.T) {
    	const NRune = 1000
    	// Built a test slice while we write the data
    	b := make([]byte, utf8.UTFMax*NRune)
    	var buf Buffer
    	n := 0
    	for r := rune(0); r < NRune; r++ {
    		size := utf8.EncodeRune(b[n:], r)
    		nbytes, err := buf.WriteRune(r)
    		if err != nil {
    			t.Fatalf("WriteRune(%U) error: %s", r, err)
    		}
    		if nbytes != size {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. src/archive/zip/reader_test.go

    				Mode:     0666,
    			},
    		},
    	},
    	{
    		Name: "utf8-7zip.zip",
    		File: []ZipTestFile{
    			{
    				Name:     "世界",
    				Content:  []byte{},
    				Mode:     0666,
    				Modified: time.Date(2017, 11, 6, 13, 9, 27, 867862500, timeZone(-8*time.Hour)),
    			},
    		},
    	},
    	{
    		Name: "utf8-infozip.zip",
    		File: []ZipTestFile{
    			{
    				Name:    "世界",
    				Content: []byte{},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  3. src/archive/zip/writer.go

    		//
    		// Forbid 0x7e and 0x5c since EUC-KR and Shift-JIS replace those
    		// characters with localized currency and overline characters.
    		if r < 0x20 || r > 0x7d || r == 0x5c {
    			if !utf8.ValidRune(r) || (r == utf8.RuneError && size == 1) {
    				return false, false
    			}
    			require = true
    		}
    	}
    	return true, require
    }
    
    // prepare performs the bookkeeping operations required at the start of
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/asm/parse.go

    	case scanner.Int:
    		return p.atoi(tok.String())
    	case scanner.Char:
    		str, err := strconv.Unquote(tok.String())
    		if err != nil {
    			p.errorf("%s", err)
    		}
    		r, w := utf8.DecodeRuneInString(str)
    		if w == 1 && r == utf8.RuneError {
    			p.errorf("illegal UTF-8 encoding for character constant")
    		}
    		return uint64(r)
    	case '+':
    		return +p.factor()
    	case '-':
    		return -p.factor()
    	case '~':
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  5. src/archive/tar/writer_test.go

    				Name:       "file4",
    				ModTime:    time.Unix(1400000000, 0),
    				PAXRecords: map[string]string{"mtime": "1400000000"},
    			}, nil},
    			testClose{nil},
    		},
    	}, {
    		file: "testdata/gnu-utf8.tar",
    		tests: []testFnc{
    			testHeader{Header{
    				Typeflag: TypeReg,
    				Name:     "☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹",
    				Mode:     0644,
    				Uid:      1000, Gid: 1000,
    				Uname:   "☺",
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  6. doc/go_spec.html

    The <a href="/pkg/cmd/vet"><code>go vet</code></a> tool flags certain
    integer-to-string conversions as potential errors.
    Library functions such as
    <a href="/pkg/unicode/utf8#AppendRune"><code>utf8.AppendRune</code></a> or
    <a href="/pkg/unicode/utf8#EncodeRune"><code>utf8.EncodeRune</code></a>
    should be used instead.
    </li>
    </ol>
    
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top