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

MethodError: no method matching position(::StringDecoder{...}) with readuntil #26

Open
nalimilan opened this issue Jun 17, 2018 · 0 comments

Comments

@nalimilan
Copy link
Member

julia> readuntil(IOBuffer("noël"), enc"UTF-8", "ë")
"no"

julia> readuntil(IOBuffer("noël"), enc"UTF-8", 'ë')
ERROR: MethodError: no method matching position(::StringDecoder{Encoding{Symbol("UTF-8")},Encoding{Symbol("UTF-8")},Base.GenericIOBuffer{Array{UInt8,1}}})
Closest candidates are:
  position(::Base.Filesystem.File) at filesystem.jl:225
  position(::Base.Libc.FILE) at libc.jl:92
  position(::IOStream) at iostream.jl:188
  ...
Stacktrace:
 [1] mark(::StringDecoder{Encoding{Symbol("UTF-8")},Encoding{Symbol("UTF-8")},Base.GenericIOBuffer{Array{UInt8,1}}}) at ./io.jl:915
 [2] peek at ./iostream.jl:525 [inlined]
 [3] read(::StringDecoder{Encoding{Symbol("UTF-8")},Encoding{Symbol("UTF-8")},Base.GenericIOBuffer{Array{UInt8,1}}}, ::Type{Char}) at ./io.jl:625
 [4] #readuntil#283(::Bool, ::Function, ::StringDecoder{Encoding{Symbol("UTF-8")},Encoding{Symbol("UTF-8")},Base.GenericIOBuffer{Array{UInt8,1}}}, ::Char) at ./io.jl:646
 [5] #readuntil#11 at ./none:0 [inlined]
 [6] readuntil(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Encoding{Symbol("UTF-8")}, ::Char) at /home/milan/.julia/StringEncodings/src/StringEncodings.jl:443
 [7] top-level scope at none:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant