Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io: RuneReader interface should not be documented as a UTF-8 decoder. #49178

Closed
i4ki opened this issue Oct 27, 2021 · 1 comment
Closed

io: RuneReader interface should not be documented as a UTF-8 decoder. #49178

i4ki opened this issue Oct 27, 2021 · 1 comment

Comments

@i4ki
Copy link

i4ki commented Oct 27, 2021

The RuneReader interface documentation states that RuneRead() reads a single UTF-8 encoded Unicode character but this depend on the implementation. It seems reasonable to make RuneReader interface generic so a UTF-16 implementation is possible.

I propose to drop "UTF-8" from the docs:

RuneReader is the interface that wraps the ReadRune method.

ReadRune reads a single encoded Unicode character and returns the rune and its size in bytes. If no character is available, err will be set.
@gopherbot
Copy link

Change https://golang.org/cl/359334 mentions this issue: io: remove UTF8 specified document for RuneReader

@golang golang locked and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants